(questions and verified answers) FREQUENTLY MOST
TESTED QUESTIONS |already graded A+|100%
passed!!
If you compile a java source file containing a definition of class called MyApp,
what is the name of the file that contains the results - (ANSWER)MyApp.class
Given the code:
String greeting = "Hello there!";
System.out.println(greeting.length());
What is displayed to the screen? - (ANSWER)12
Which of the following objects is used to display normal output to the screen? -
(ANSWER)System.out
Which of the following statements reads a number from the keyboard? -
(ANSWER)number = keyboard.nextInt();
Which of the following keywords is NOT required when declaring a named
constant?
final
void
public
, static - (ANSWER)void
The java compiler translates source code written in Java into which of the
following languages? - (ANSWER)Bytecode
Which of the following is used to display formatted output? -
(ANSWER)System.out.printf
What is the relationship between a class and an object? - (ANSWER)A class is a
blueprint for creating objects
Which of the following statements does NOT increase the value of the variable
number by 1?
number += 1
number + 1
number = number + 1
number ++ - (ANSWER)number + 1
which of the following is the correct way to test if two strings s1 and s2 are
exactly the same? - (ANSWER)s1.equals(s2)