CS 1401, Quiz #2

Date: Tuesday, January 31, 2006
Class section (9 am or 10:30 am): ______________________
Name: ______________________________________________________________________

1. For each item on the first list, find the description from the second list that is most appropriate.
(a) metalanguage
(b) object-oriented language
(c) machine language
(e) high-level programming language

(1) a language that includes constructs to associate data with the code for operating on the data.
(2) a programming language that is close to a natural language.
(3) a language that is used to describe another language.
(4) a language where instructions are in binary code for a specific machine.

2. For each string, write down whether this string is a valid name for an identifier in Java; if not, explain why.

january 31








3. Write a Java code that defines a new variable month of type String and assigns, to this variable, a new value January.

4. In order to print a string, one must use Java method System.out. Write down a Java command that would print the following string:
"The month is over," said the bird.