Tag: java

Questions Related to java

Which of the following java doesnt support?

  1. signed number

  2. unsigned number

  3. signed right shift

  4. unsigned left shift


Correct Option: B
  1. logical NOT

  2. logical OR

  3. logical AND

  4. logical XOR


Correct Option: A
  1. multithreading

  2. multitasking

  3. multiprograming

  4. multiprocessing


Correct Option: A

_________ defines how the component will be arranged in the container

  1. layout manager

  2. outline manager

  3. component design

  4. component manager


Correct Option: A

Overriding and Overloading is for ?

  1. Methods and variables

  2. Class

  3. Variables

  4. Methods


Correct Option: D

For a subclass outside the package, the protected member can be accessed through ?

  1. Object of super class

  2. Inheritance

  3. Both

  4. None


Correct Option: B
  1. static void doStuff(int... doArgs) { }

  2. static void doStuff(int x, int... doArgs) { }

  3. static void doStuff(int[] doArgs) { }

  4. static void doStuff(int... doArgs, int y) { }


Correct Option: A,B

Which variables have the longest scope?

  1. Block variables

  2. Instance variables

  3. Static variables

  4. Local variables


Correct Option: C
  1. Object reference =null

  2. double =0.0

  3. byte=0

  4. char = '\u0000'


Correct Option: A,B,C,D