
Why Programming? Why Java?
Authored by Terri Koehler
Computers
12th Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Select the correct statement about the difference between the print() method and the println() method in Java.
print() adds a newline at the end, while println() does not.
println() adds a newline at the end, while print() does not.
Both methods add a newline at the end.
Neither method adds a newline at the end.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of lines beginning with 'public' in a Java program?
To define a public class or method
To declare a private variable
To import a package
To comment out a line of code
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why is it important for the class name to match the file name in Java?
It helps in organizing the code better.
It is required for the Java compiler to find the class.
It improves the readability of the code.
It is a convention but not necessary.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the significance of using text inside quotation marks in programming?
To denote a string literal
To comment out code
To highlight keywords
To indicate a variable
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference in the outputs between the print("...") and the println("...") statement?
print("...") adds a newline after the output, while println("...") does not.
println("...") adds a newline after the output, while print("...") does not.
Both print("...") and println("...") add a newline after the output.
Neither print("...") nor println("...") add a newline after the output.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are some reasons you would want to use System.out.print instead of System.out.println?
To print without a newline at the end
To print with a newline at the end
To print in uppercase
To print in lowercase
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What format do I use to print words in JAVA?
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
CP M4 Repetition & Loops
Quiz
•
9th - 12th Grade
11 questions
Python Library-1
Quiz
•
12th Grade
15 questions
CSS
Quiz
•
8th - 12th Grade
9 questions
IF Statements
Quiz
•
12th Grade
15 questions
12-sci-java-basics
Quiz
•
12th Grade
10 questions
Word basics
Quiz
•
8th - 12th Grade
15 questions
N4 Theory - 2
Quiz
•
12th Grade - University
10 questions
File handling
Quiz
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade