Homework CH 1 Java

Topics: Programming language, Object-oriented programming, Java Pages: 8 (723 words) Published: January 28, 2015
Homework CH 1

1. The most basic circuitry-level computer language, which consists of on and off switches , is ________ .
a. a high-level language
b. machine language
c. Java
d. C++
The correct answer is B. Machine Language

2. Languages that let you use a vocabulary of descriptive terms, such as read, write, or add, are known as __________ languages.
a. high-level
b. machine
c. procedural
d. object-oriented
The correct answer is A. High-level

3. The rules of a programming language constitute its _________. a. objects
b. logic
c. format
d. syntax
The correct answer is D.Syntax

4. A ______ translates high-level language statements into machine code. a. programmer
b. syntax detector
c. compiler
d. deciphere
The correct answer is C . Compiler

5. Named computer memory locations are called ________ .
a. compilers
b. variables
c. addresses
d. appellations
The correct answer is B.Variables

6. The individual operations used in a computer program are often grouped into logical units called ___________.
a. procedures
b. variables
c. constants
d. logistics
The correct answer is A.Procedures

7. Envisioning program components as objects that are similar to concrete objects in the real world is the hallmark of _________________ .
a. command-line operating systems
b. procedural programming
c. object-oriented programming
d. machine languages
The Answer is C.Object-Oriented Programming

8. The values of an object’s attributes also are known as its _________. a. state
b. orientation
c. methods
d. condition
The correct answer is A.State

9. An instance of a class is a(n) ________.
a. object
b. procedure
c. method
d. class
The Answer is A.Object
10. Java is architecturally ________.
a. specific
b. oriented
c. neutral
d. abstract
The correct answer is C. Neutral
11. You must compile classes written in Java into _______.
a. bytecode
b. source code
c. javadoc statements
d. object code
The Correct answer is A.Bytecode

12. All Java programming statements must end with a _________. a. period
b. comma
c. semicolon
d. closing parenthesis
The answer is C. Semicolon

13. Arguments to methods always appear within ______.
a. parentheses
b. double quotation marks
c. single quotation marks
d. curly braces
The correct answer is A.Parentheses

14. In a Java program, you must use _________to separate classes, objects, and methods.
a. commas
b. semicolons
c. dots
d. forward slashes
The Correct answer is C. Dots

15. All Java applications must have a method named _________. a. method()
b. main()
c. java()
d. Hello()
The Correct answer is B. Main ()

16. Nonexecuting program statements that provide documentation are called ________.
a. classes
b. notes
c. comments
d. commands
The Correct answer is C. Comments

17. Java supports three types of comments: _____________,___________ , and javadoc.
a. line, block
b. string, literal
c. constant, variable
d. single, multiple
The Correct Answer is D. Single,Multiple

18. After you write and save a Java application file, you__________ it. a. interpret and then compile
b. interpret and then execute
c. compile and then resave
d. compile and then interpret
The correct answer is C. Compile and Resave

19. The command to execute a compiled Java application is______________ . a. run
b. execute
c. javac
d. java
The correct answer is C. Javac

20. You save text files containing Java source code using the file Extension________ .
a. .java
b. .class
c. .txt
d. .src
The correct answer is A. Java
1. For each of the following Java identifiers, note whether it is legal or illegal: a. budgetApproval-Legal
b. German Shepherd-legal
c. static-legal
d. HELLO-Legal
e. 212AreaCode-Ilegal
f. qhu6TRfg-Legal
g. ssn#-Legal
h. 4999-Illegal
i. 17-Illegal
j. Accounts_Receivable-Legal
k. 32MPG-Illegal
l. rulesOfOrder-Legal
2. Name at least three attributes that...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • JAVA Essay
  • Tax 1 homework ch 6 Essay
  • Java Essay
  • homework Essay
  • Java Essay
  • Java Essay
  • 1F Homework 1 Ch 1 2 Research Paper
  • Essay on Java Cis Assignment 1

Become a StudyMode Member

Sign Up - It's Free