JAVA PRACTICE EXAM 2025
QUESTIONS AND ANSWERS
Backspace - ANSWER✔✔-\b
Tab - ANSWER✔✔-\t
Linefeed - ANSWER✔✔-\n
carriage return - ANSWER✔✔-\r
single quote - ANSWER✔✔-\'
Double quote - ANSWER✔✔-\"
backslash - ANSWER✔✔-\\
form feed - ANSWER✔✔-\f
Octal character - ANSWER✔✔-\ddd
Hexadecimal unicode - ANSWER✔✔-\uxxx
,whats an expression - ANSWER✔✔-can have a single variable or constant or can consist
of operators and operands
___________ is interpreted. - ANSWER✔✔-Java
_______________is the brain of the computer - ANSWER✔✔-CPU
Which JDK command is correct to run a Java application - ANSWER✔✔-Java Bytecode
__________is Architecture-neutral - ANSWER✔✔-Java
__________ is software that interprets Java bytecode - ANSWER✔✔-Java Compiler
Java compiler translates Java source code into ___________. - ANSWER✔✔-Java
bytecode
______________is a program that runs on a computer to manage and control a
computers activness - ANSWER✔✔-Opertating system
Java was developed by - ANSWER✔✔-Sun Microsystems
programming style is important because_______________. - ANSWER✔✔-good
programming style helps reduce programming errors
Why do computers use zeros and ones - ANSWER✔✔-because digital devices have two
stable states and it is natural to use one state for 0 and the other for 1.
Java_____________ can run from a Web browser - ANSWER✔✔-applets
,Application program interface. Contains predefined classes and interfaces for
developing Java programs. - ANSWER✔✔-Java API
Java Development Toolkit. A set of separate programs, each invoked from a command
line, for developing and testing Java programs. - ANSWER✔✔-Java JDK
A specification for software which interprets Java programs that have been compiled
into byte-codes, and usually stored in a ".class" file. - ANSWER✔✔-Java Virtual
Machine
public class Class {
public static void main(String[] args) { - ANSWER✔✔-Main method
Boolean variables - ANSWER✔✔-Hold either 'true' or 'false'
________ consists of a set of separate programs for developing and testing Java
programs, each of which is invoked from a command line - ANSWER✔✔-Java JDK
The JDK command to compile a class in the file Test.java is - ANSWER✔✔-Javac Test
The extension name of a Java bytecode file is - ANSWER✔✔-.exe
________ is a software that interprets Java bytecode - ANSWER✔✔-Java virtual
machine
Computer can execute the code in ___________ - ANSWER✔✔-machine language
, A block is enclosed inside __________ - ANSWER✔✔-Braces
_______ consists of a set of separate programs for developing and testing Java
programs, each of which is invoked from a command line - ANSWER✔✔-Java JDK
The extension of the binary output created by a Java program is? - ANSWER✔✔-.class
On successful compilation a file with the class extension is created - ANSWER✔✔-true
Which JDK command is correct to run a Java application in ByteCode.class -
ANSWER✔✔-Java bytecode
__________ translates high-level language program into machine language program -
ANSWER✔✔-A compiler
____________is the physical aspect of the computer that can be seen. - ANSWER✔✔-
Hardware
Speed of a computer can be measured in____________________. - ANSWER✔✔-giga
and merga hertz
One byte has ________ bits. - ANSWER✔✔-8
If a program compiles fine, but it produces incorrect result, then the program suffers
________. - ANSWER✔✔-a logic error
Is an object oriented language - ANSWER✔✔-Java, C++, Python
QUESTIONS AND ANSWERS
Backspace - ANSWER✔✔-\b
Tab - ANSWER✔✔-\t
Linefeed - ANSWER✔✔-\n
carriage return - ANSWER✔✔-\r
single quote - ANSWER✔✔-\'
Double quote - ANSWER✔✔-\"
backslash - ANSWER✔✔-\\
form feed - ANSWER✔✔-\f
Octal character - ANSWER✔✔-\ddd
Hexadecimal unicode - ANSWER✔✔-\uxxx
,whats an expression - ANSWER✔✔-can have a single variable or constant or can consist
of operators and operands
___________ is interpreted. - ANSWER✔✔-Java
_______________is the brain of the computer - ANSWER✔✔-CPU
Which JDK command is correct to run a Java application - ANSWER✔✔-Java Bytecode
__________is Architecture-neutral - ANSWER✔✔-Java
__________ is software that interprets Java bytecode - ANSWER✔✔-Java Compiler
Java compiler translates Java source code into ___________. - ANSWER✔✔-Java
bytecode
______________is a program that runs on a computer to manage and control a
computers activness - ANSWER✔✔-Opertating system
Java was developed by - ANSWER✔✔-Sun Microsystems
programming style is important because_______________. - ANSWER✔✔-good
programming style helps reduce programming errors
Why do computers use zeros and ones - ANSWER✔✔-because digital devices have two
stable states and it is natural to use one state for 0 and the other for 1.
Java_____________ can run from a Web browser - ANSWER✔✔-applets
,Application program interface. Contains predefined classes and interfaces for
developing Java programs. - ANSWER✔✔-Java API
Java Development Toolkit. A set of separate programs, each invoked from a command
line, for developing and testing Java programs. - ANSWER✔✔-Java JDK
A specification for software which interprets Java programs that have been compiled
into byte-codes, and usually stored in a ".class" file. - ANSWER✔✔-Java Virtual
Machine
public class Class {
public static void main(String[] args) { - ANSWER✔✔-Main method
Boolean variables - ANSWER✔✔-Hold either 'true' or 'false'
________ consists of a set of separate programs for developing and testing Java
programs, each of which is invoked from a command line - ANSWER✔✔-Java JDK
The JDK command to compile a class in the file Test.java is - ANSWER✔✔-Javac Test
The extension name of a Java bytecode file is - ANSWER✔✔-.exe
________ is a software that interprets Java bytecode - ANSWER✔✔-Java virtual
machine
Computer can execute the code in ___________ - ANSWER✔✔-machine language
, A block is enclosed inside __________ - ANSWER✔✔-Braces
_______ consists of a set of separate programs for developing and testing Java
programs, each of which is invoked from a command line - ANSWER✔✔-Java JDK
The extension of the binary output created by a Java program is? - ANSWER✔✔-.class
On successful compilation a file with the class extension is created - ANSWER✔✔-true
Which JDK command is correct to run a Java application in ByteCode.class -
ANSWER✔✔-Java bytecode
__________ translates high-level language program into machine language program -
ANSWER✔✔-A compiler
____________is the physical aspect of the computer that can be seen. - ANSWER✔✔-
Hardware
Speed of a computer can be measured in____________________. - ANSWER✔✔-giga
and merga hertz
One byte has ________ bits. - ANSWER✔✔-8
If a program compiles fine, but it produces incorrect result, then the program suffers
________. - ANSWER✔✔-a logic error
Is an object oriented language - ANSWER✔✔-Java, C++, Python