Java Quiz Question with Answer

31. Which of the following is used to see the details of the compilation

  1. javac -detail
  2. javac -verbose
  3. None of these
  4. javac -debug

32. Which of the following is not a keyword in Java.

  1. boolean
  2. assert
  3. finalize
  4. abstract

33. Which of the following is not a keyword in Java.

  1. strictfp
  2. instanceof
  3. emun
  4. transient

34. We can write comment like this jn Java Programming: /* /* comment 1 */ comment 2 */

  1. true
  2. false

35. What is Literal in Java Programming?

  1. Source code representation of a fixed value
  2. special type of class
  3. special type of data type
  4. none of these

36. It is possible to assign a literal to a variableof a primitive type.

  1. False statement
  2. True statement

37. boolean result = true; Which type of literal is assigned to the variable result?

  1. boolean
  2. char
  3. string
  4. bool

38. Which type of literal is written in pair of single quote?

  1. float
  2. boolean
  3. integer
  4. character

39. An integer literal is of type long if and only if it has suffix - ______ in Java programming.

  1. L
  2. D
  3. O
  4. F

40. ____ literal is used to create values of the integral types byte, short, int and long.

  1. Double
  2. Integer
  3. Byte
  4. Long

Tags :

Multiple Choice Questions and Answers on Java

Java Multiple Choice Questions and Answers

Java Trivia Quiz

Java Question and Answer PDF Online

Spreading Knowledge Across the World

USA - United States of America  Canada  United Kingdom  Australia  New Zealand  South America  Brazil  Portugal  England  Scotland  Norway  Ireland  Denmark  France  Spain  Poland  Netherland  Germany  Sweden  South Africa  Ghana  Tanzania  Nigeria  Kenya  Ethiopia  Zambia  Singapore  Malaysia  India  Pakistan  Nepal  Taiwan  Philippines  Libya  Cambodia  Hong Kong  China  UAE - Saudi Arabia  Qatar  Oman  Kuwait  Bahrain  Dubai  Israil  and many more....