You have been asked to develop a Java program that prints the elements of an array in reverse order.
Which looping statement cannot be used to meet the requirement?
A. enhanced for
B. standard for
C. while
D. do-while
Given the code fragment:
Which statement is true?
A. The code results in a compilation error. To make it compile, insert at line n1: import java.lang.Math; import java.lang.Random;
B. The code compiles successfully
C. The code results in a compilation error. To make it compile, insert at line n1: import java.lang; import java.util;
D. The code results in a compilation error. To make it compile, insert at line n1: import java.util.*;
Given the code fragment:
What is the result?
A. 3
B. A compilation error occurs.
C. 2
D. 0
Given the code fragment: What is the result?
A. Selected null flavor.
B. Selected Chocolate flavor.
C. An ArrayIndexOutofBoundsException is thrown at run time.
D. Selected Chocolate flavor. Thank you!
You have a microprocessor board, such as Raspberry PI, wired to control a drone.
Which edition of Java is geared towards use of simple, closed systems with constrained memory requirements, such as a microprocessor board?
A. Java Micro Edition
B. Java Standard Edition with a Compact Profile
C. Java Enterprise Edition
D. Java SE Embedded
Given:
At which line does a compilation error occur?
A. line 5
B. line 2
C. line 3
D. line 7
Given the code fragment:
What is the result?
A. 10 20 10 15 20
B. A runtime exception is thrown.
C. 10 20 10 20
D. A compilation error occurs.
Given the code fragment:
What is the result?
A. false false
B. true true
C. true false
D. false true
Identify three features of the Java programming language.
A. distributed
B. direct memory management
C. multithreaded
D. strongly typed
E. dynamically typed
Which package would you import to use the Random class?
A. java.io
B. java.math
C. java.util
D. java.lang