In each case click the single most appropriate response. Only the correct response will register in the radio button.

Java program that must be run in a web browser?

Application
Applet
Java Virtual Machine
JavaDocs
Method

What is the role of the Java Virtual Machine?

writes Java code dynamically
generates .class files
generates JavaDocs
gives Java its platform independence
compiles Java source code

Which comment indicator is unique to Java?

//abc
/*abc*/
/**abc*/
!-->
<--

Compiles a Java program....

compile HelloWorld.java
java HelloWorld.java
java HelloWorld
javac HelloWorld.class
javac HelloWorld.java

How does a .java file differ from a .class file?

.java file is bytecode
.class file is source code
.class file is HTML
.java file is a compiled .class file
.class file is a compiled .java file

... a floating-point number?

double
char
long
int
boolean

Minimum required to declare variable in Java?

a type, an identifier, and an initial value
a type and an identifier
an initial value and a type
a primitive and an initial value
an identifier

Which will compile OK?

int name = "Juan";
char age = "40";
int month = 05;
boolean addToList = 1;
double weight = 68.4

Which keyword is used to declare a class variable?

static
var
class
void
final

Which would be implicitly cast?

a byte to a short
an int to a byte
a boolean to a float
a double to a short
a long to an int

Wrong answers so far:

top