Java Programming Fundamentals

Test your knowledge of Java programming concepts including exceptions, inner classes, abstract classes, and EJB components.

11 Questions Published

Questions

Question 1 True/False

An exception can be caught by a catch block with an argument type that is a superclass of the thrown exception.

  1. True
  2. False
Question 2 True/False

a method cannot be declared as throwing more than one exception.

  1. True
  2. False
Question 3 True/False

can you have a final abstract class?

  1. True
  2. False
Question 4 True/False

an abstract class can have a constructor?

  1. True
  2. False
Question 5 True/False

It is legal to access a static method using an instance of the class?

  1. True
  2. False
Question 6 True/False

assuming all variables are declared and initialized properly this will compile. for(i=l; k< 5; j++){};

  1. True
  2. False
Question 7 Multiple Choice (Single Answer)

EJB stands for ....

  1. Enterprise Java Bean
  2. Enter Java Bean
  3. Exceptional Java Bean
  4. Event Java Bean
Question 8 True/False

It is not possible to have an instance of a non-static inner class before any instances of the outer class have been created.

  1. True
  2. False
Question 9 True/False

If method A declares that it throws an exception and method B calls method A,then method B must ALWAYS declare the same exception.

  1. True
  2. False
Question 10 Multiple Choice (Single Answer)

This is legal. float f = 2;

  1. Yes
  2. No
  3. Compile error
  4. Don't know
Question 11 True/False

Static variables are implicitly final.

  1. True
  2. False