Final Exam (part 1) Flashcards
The compiler generates bytecode even if the program has syntax errors. T/F
False
Java was originally developed by a team led by James Gosling at Sun Microsystems. T/F
True
One byte has ____ bits.
8
The JDK command to compile a class in the file Text.java is _____.
javac Test.java
The command to compile a class in the file Test.java is ____.
javac Test.java
______ is a technical definition of the language that includes the syntax and semantics of the java programming language.
Java JDK
The extension name of a java source code file is _____.
.java
A block is enclosed inside _____.
braces
To assign a double variable d to a float variable x, you write ______.
x = (float)d;
-25 % 5 is _____.
0
To improve readability and maintainability, you should declare _____ instead of using literal values such as 3.14159.
constants
To assign a value 1 to variable x, you write ______.
x = 1;
Which of the following assignment statements is illegal?
float f = -34;
int t = 23;
short s = 10;
float f = 34.0;
float f = 34.0;
Any assignment statement can be used as an assignment expression. T/F
True
If you attempt to add an int, a byte, a long, and a double, the result will be a _____ value.
double