IT 114: Introduction to Java
Answers to Class 9 Ungraded Quiz
If a Java file contains the class named Hello, what must it's filename be?
Hello.java
What Java statement would you write to print "Hello" but
not
advance to the next line?
System.out.print("Hello");
Can a
for
loop contain another
for
loop?
yes
What is the name of the class of words that has special meaning in the Java language?
keywords
What are the characters used to write a single line Java comment?
//
What are the characters used to write a multiline Java comment?
/* and */
If you add a variable of type
int
to one of type
double
what type will the result be?
double
What would the result of dividing 7 by 2 be in Java?
3