
Java Pop Quiz
Authored by Jakobi Gorham
Computers
9th - 12th Grade
Used 7+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which is the correct way of writing main() function in Java?
public static void main(String args[ ])
public void main(String args[ ])
public static main(String args[ ])
public void static main(String args[ ])
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which is the correct way of writing println() function in Java?
System.out.println("Message = " + variable);
System.println("Message = " + variable);
System.output.println("Message = " + variable);
System.println.out("Message = " + variable);
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is a valid variable declaration in Java?
int 1myInteger = 0;
int int = 0;
Int my Integer = 0;
int myInteger = 0;
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is a class in object-oriented programming?
A class is a template with data and methods
A class is a package
A class is the declared object in memory
A class is a reference object in memory
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the problem with this code?
Line 1: String myName = "Mary Jacobson";
Line 2: System.out.println ("My name is " + myname);
Line 2: should be System.out.println ("My name is myName");
Line 2: should be System.out.println ("My name is "+ myName);
Line 2: should be System.out.display("My name is " + myname);
There is no problem with the code
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How is a single line comment created in Java?
Two backward slashes at the beginning indicate that the line is a comment
Two forward slashes at the beginning indicate that the line is a comment.
A forward slash followed by two asterisks at the beginning indicate that the line is a comment.
A forward slash followed by an asterisk at the beginning indicate that the line is a comment.
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Identify types of error that exist in this method program:-
Logic error
runtime error
syntax error
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
10 questions
PC1.8 Evaluate computer program
Quiz
•
9th Grade
10 questions
POST TES INFORMATIKA BAB 2
Quiz
•
9th Grade
12 questions
Q2 WEEK 3 PRACTICE QUIZ #2
Quiz
•
9th Grade
10 questions
Recap: Introduction to Python
Quiz
•
10th Grade
10 questions
ว30285-ทดสอบเรื่องคำสั่งแบบเงื่อนไข
Quiz
•
10th Grade
10 questions
Computer System
Quiz
•
8th - 9th Grade
10 questions
12 CA One Mark 1-3
Quiz
•
12th Grade
10 questions
Lógica Computacional - Os tipos de armazenamento de dados
Quiz
•
10th 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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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