Logo

Java Questions Set 19:

Quiz Mode

What is the extension of java compiled classes ?

1
2
3
4

Solution:

Which method will a web browser call on a new applet

1
2
3
4

Solution:

  The number is an abstract class containing subclasses Double, Float,  Short, Integer and Long. 

1
2

Solution:

Which is the method which is executed first before the execution of any other things takes place in a program?

1
2
3
4

Solution:

What will be the output of the following Java program? (Note: inputoutput.java is stored on the disk.)

1
2
3
4

Solution:

what should be the output of this code block ?

 public class abekus {

  public static void main(String args[]) {

   String str = "abekus";

   System.out.println(str.indexOf('z'));

  }

 }

1
2
3
4

Solution:

Which of the following statements about Java is correct?

1
2
3
4

Solution:

class

{

public static void main(String args[]) 

double a = 15.64;

int b = 15;

a = a % 10;

b = b % 10;

System.out.println(a + " " + b);

}

1
2
3
4

Solution:

What is the output of this program?

class A

    {

        public static void main(String args[]) 

        {        

             int a= 5;

             int b = ~a;

             int c;

             c = a > b ? a : b;

             System.out.print(c);

        } 

    }

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 { throw new NullPointerException("Hello"); } catch(ArithmeticException e) { System.out.print("B"); } } }

1
2
3
4

Solution: