REAL EXAM QUESTIONS AND CORRECT ANSWERS
(VERIFIED ANSWERS ) ALREADY GRADED A+
(GUARANTEED SUCCESS) 2025 BRAND NEW!!
How do you declare a variable of type char? - ANSWER-
char a = '0';
char
a;
ANYTHING IN SINGLE
QUOTES
How do you declare a variable of type String? -
ANSWER-String a;
String a =
"0";
Given the following declaration: String s =
"Arizona_State_University";, evaluate
the expression: s.charAt(4) -
ANSWER-'o'
,The following nested loop structure will execute the inner most
statement (x++)
how many
times?
for (int j = 0; j < 10;
j++) for (int k = 100;
k >0; k--) x++; -
ANSWER-100
Which reserved word in Java is used to create an
instance of a class -
ANSWER-
new
The relationship between a class and an object is best
described as... -
ANSWER-objects are instances of
classes
Which of the following would not be considered an algorithm?
pseudocode, shopping list, recipe, computer program -
ANSWER-a shopping
list
, if x is an int where x = 1, what will x be after the following loop
terminates?
while (x <
100)
x *= 2; - ANSWER-
128
Decide if the printed output will be true or false:
Point pointA = new Point (0.0);
Point pointB = new Point(0,0);
System.out.println(point A == pointB); - ANSWER-false
A variable whose scope is restricted to the method where it
was declared is
known as a - ANSWER-local
variable
for the following code, where x=0, what is the resulting value
of x after the for-
loop
terminates?