1. ____________ is a device to connect a computer to a local area network (LAN).
a. Regular modem
b. DSL
c. NIC
d. Cable modem
#
2. A Java application must have a main method.
a. true
b. false
#
3. Why do computers use zeros and ones?
a. because combinations of zeros and ones can represent any numbers and characters.
b. because digital devices have two stable states and it is natural to use one state for 0 and the other for 1.
c. because binary numbers are simplest.
d. because binary numbers are the bases upon which all other number systems are built.
#
4. _________ are secondary storage.
a. RAM
b. hard disk
c. CD
d. floppy disk
#
5. ________ is an object-oriented programming language.
a. C
b. Java
c. C
d. Pascal
e. C#
#
6. Java compiler translates Java source code into _________.
a. another high-level language code
b. machine code
c. assembly code
d. Java bytecode
#
7.
Java is an object-oriented programming language.
a. true
b. false
#
8. Java ___________ can run from a Web browser.
a. applets
b. applications
c. servlets
d. Micro Edition programs
#
9. The command to compile a class in the file Test.java is
a. java Test
b. javac Test
c. javac Test.java
d. java Test.java
e. JAVAC Test.java
#
10. ____________ is an operating system.
a. Ada
b. C
c. Windows XP
d. Java
e. Visual Basic
#
11.
________ is the physical aspect of the computer that can be seen.
a. Operating system
b. Hardware
c. Software
d. Application program
#
12. Every statement in Java ends with ________.
a. an asterisk (*)
b. a comma (,)
c. a period (.)
d. a semicolon (;)
#
13. The public classname must be the same as the filename that contains the class.
a. false
b. true
#
14. The JDK command to compile a class in the file Test.java is
a. java Test.java
b. javac Test
c. JAVAC Test.java
d. java Test
e. javac Test.java
#
15. To use JOptionPane in your program, you may import it using:
a. import javax.swing.*;
b. import javax.s