Logo

Java Questions Set 69:

Quiz Mode

 Java system properties are accessible by any process 

1
2

Solution:

What causes a program to exit abruptly, making it difficult to debug the root cause?

1
2
3
4

Solution:

The   fields in an interface are implicitly specified as

1
2
3
4

Solution:

Which of these methods returns a description of an exception?

1
2
3
4

Solution:

What is the term used to describe an arithmetic operation involving only real operands?

1
2
3
4

Solution:

Select the wrong way to create threads in java?

1
2
3
4

Solution:

1. class mainclass {

2.         public static void main(String args[]) 

3.         {

4.             char b = 'B';

5.             b++;

6.      System.out.print((int)b);

7.         } 

8.     }

1
2
3
4

Solution:

class test{

public static void main (String[] args) {

int x, y, z;

        x = 0;

        y = 1;

        x = y = z = 8;

        y=z=x+y;

        System.out.print(x+" "+y+" "+z);

}

}

1
2
3
4

Solution:

class GFG {

public static void main (String[] args) {

  boolean a=!true;

  boolean b=!a;

  boolean c=!!a&!b;

  boolean d=!(!c||!!b&&(c^!b));

  System.out.println(c+" "+d);

}

}

1
2
3
4

Solution:

What will be the output of the following Java code?


class exception_handling 

{

public static void main(String args[]) 

{

try 

{

System.out.print("Hello" + " " + 1 / 0);

}

finally 

{

System.out.print("World"); 

}

}

}

1
2
3
4

Solution: