Logo

Java Questions Set 49:

Quiz Mode

Which of the following is not a type of Enterprise JavaBeans (EJB)?

1
2
3
4

Solution:

 The remaining capacity of BlockingQueue whose intrinsic capacity is not defined 

1
2
3
4

Solution:

Is the following statement True or False? : "Annotations which are applied to other annotations are called meta annotations."

1
2

Solution:

Which of these processes occur automatically by the Java runtime system?

1
2
3
4

Solution:

public class outputs 

    {

        public static void main(String args[]) 

        {

          int a = 3;

             System.out.print(++a%10 * 8%2);

 

        } 

    }

1
2
3
4

Solution:

Which four options describe the correct default values for array elements of the types indicated?

  1. int -> 0
  2. String -> "null"
  3. Dog -> null
  4. char -> '\u0000'
  5. float -> 0.0f
  6. boolean -> true

1
2
3
4

Solution:

What will be the output of the following Java program?


class Output

{

public static void main(String args[])

{

Double i = new Double(257.578123456789);

float x = i.floatValue();

System.out.print(x);

}

}

1
2
3
4

Solution:

What are the correct statements about the Java Virtual Machine (JVM)?

1
2
3
4
5

Solution:

Predict the output of the following Java code.

import java.util.concurrent.*;

public class Abekus {

public static void main(String[] args)

{

ConcurrentLinkedDeque<Integer> c = new ConcurrentLinkedDeque<Integer>();

c.add(45);

c.add(78);

c.add(67);

c.add(23);

c.addFirst(99);

System.out.println(c);

}

}

1
2
3
4

Solution:

Which of the following statements about string methods is correct?

1
2
3
4

Solution: