JAVA SE 8 - Fundamentals Quiz Questions and Answers

Which of these constructors is used to create an empty String object?

Answer :
  • String()

Which of the following option leads to the portability and security of Java?

Answer :
  • Bytecode is executed by JVM

Which of these is an incorrect array declaration?

Answer :
  • int arr[] = int [5] new

Which of these coding types is used for data type characters in Java?

Answer :
  • UNICODE

Which of these values can a boolean variable contain?

Answer :
  • True & False

Which one is a valid declaration of a boolean?

Answer :
  • boolean b3 = false;

Which of these can not be used for a variable name in Java?

Answer :
  • keyword

Choose the statement(s) true about swith statement? A) switch expression supports only for primitive types B) Default options must be the last case in switch and does not require break statement C) switch expression supports only intgral and enumerated types D) mulitple case with same constant values gives compilation error

Answer :
  • AD

Which of the following variable declarations and/or initializations are correct?

Answer :
  • boolean complete = true;

Which of these operators can be used to concatenate two or more String objects?

Answer :
  • +