Sail E0 Webinar

MCQs

Total Questions : 26 | Page 3 of 3 pages
Question 21. String obj = "I LIKE JAVA";System
  1.    9
  2.    10
  3.    11
  4.    12
 Discuss Question
Answer: Option C. -> 11
Question 22. Command to execute compiled java program is
  1.    java
  2.    javac
  3.    run
  4.    javaw
 Discuss Question
Answer: Option A. -> java
Question 23. Which provides runtime environment for java byte code to be executed?
  1.    JDK
  2.    JVM
  3.    JRE
  4.    JAVAC
 Discuss Question
Answer: Option B. -> JVM
Question 24. Which of these values can a boolean variable contain?
  1.    True & False
  2.    0 & 1
  3.    Any integer value
  4.    true
 Discuss Question
Answer: Option A. -> True & False
Question 25. String s = "Java String Quiz"; System
  1.    Convert “Z” to int 90 and prints “90”
  2.    Runtime Exception
  3.    Prints “z”
  4.    Prints “Z”
 Discuss Question
Answer: Option B. -> Runtime Exception
Question 26. Which one is a valid declaration of a boolean?
  1.    boolean b1 = 1;
  2.    boolean b2 = ‘false’;
  3.    boolean b3 = false;
  4.    boolean b4 = ‘true’
 Discuss Question
Answer: Option C. -> boolean b3 = false;

Latest Videos

Latest Test Papers