Which of the following lines is a properly formatted comment?
a.
// This is a comment
b.
/* This is a comment */
c.
/*
this is a comment
*/
d.
both a and b
e.
a, b and c - ANSWER-e. a, b and c
The Java compiler translates Java source code into _____________ .
a.
assembly code
b.
C++
c.
Java bytecode
d.
an object-oriented language
e.
machine code - ANSWER-c. Java bytecode
Classes can be created from other classes by using _______________ .
a.
machine code
b.
attributes
c.
polymorphism
d.
encapsulation
e.
inheritance - ANSWER-e. inheritance Which of the following is not a valid Java identifier?
a.
thirdNumber
b.
answer_7
c.
2ndlevel
d.
highest$
e.
anExtremelyLongIdentifierIfYouAskMe - ANSWER-c. 2ndlevel
Which of the following might be included in an IDE?
a.
a compiler
b.
an editor
c.
a debugger
d.
all of the above
e.
none of the above - ANSWER-d. all of the above
Which of the following describes the act of ensuring that a program solves the intended problem in all cases?
a.
implementing the design
b.
creating a design
c.
establishing the requirements
d.
testing
e.
preliminary practice coding - ANSWER-d. testing
Write a statement that prints Hello, world to the screen.
a.
System.out.println("Hello, world")
b.
system.out.println("Hello, world");
c.
System.out.println("Hello, world");
d.
System.out.println('Hello, world'); - ANSWER-c. System.out.println("Hello, world"); What can be included in a comment?
a.
reserved words
b.
special characters
c.
user output
d.
all of the above - ANSWER-d. all of the above
Which of the following is a valid comment?
a.
int age; /* the age of the user */
b.
int age; /*// the age of the user //*/
c.
int age; */ the age of the user /*
d.
int age; //* the age of the user //* - ANSWER-a. int age; /* the age of the user */
Which of the following is not a reserved word?
a.
static
b.
this
c.
public
d.
main - ANSWER-d. main
_____________ consists of specific words and symbols to express a problem solution.
a.
An application
b.
A computer
c.
Hardware
d.
Software
e.
A programming language - ANSWER-e. A programming language
Which of the following is a valid Java identifier?
a.
Fourth_&_goal