Programming in Java
Quiz
•
Computers
•
8th Grade
•
Practice Problem
•
Medium
Adya Dalela
Used 476+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is a comment in the Java language?
/ comment /
//comment
/ comment */
<-- comment -->
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct main() method signature in Java?
public static void main (String [] args)
public static void Main (String [] args)
public static void main (string [] args)
public static void main (String args)
3.
MULTIPLE CHOICE QUESTION
20 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
30 sec • 1 pt
Which of this command does not have errors?
System.out.print("Hello World")
System.out.print(Hello World);
System.out.Print("Hello World);
System.out.print("Hello World");
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be output of below program?
public class Test {
public static void main(String[] args) {
int x = 10*20-20;
System.out.println(x);
}
}
Runtime Error
Prints 180
Prints 0
None of the above
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output for the following statement:
System.out.print("1"+"1");
11
2
Error Message
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Indicate the actual output of the statements below:
int thisYear = 2020;
System.out.println("The current year is "+thisYear);
The current year is thisYear
The current year is 2020
No output; an error exists
The current year is
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
12 questions
Revision quiz on Access
Quiz
•
8th Grade
9 questions
Technology Procedures
Quiz
•
3rd - 8th Grade
13 questions
Quiz 3: Internet safety, cyber security and encryption
Quiz
•
7th - 8th Grade
14 questions
Social media marketing
Quiz
•
1st - 10th Grade
15 questions
Cyber Security Homework 1
Quiz
•
7th - 9th Grade
14 questions
Introduction to Networks
Quiz
•
6th - 8th Grade
11 questions
Cl-8 AI Ethics & Future Gadgets
Quiz
•
8th Grade
13 questions
JavaScript Variables
Quiz
•
3rd Grade - University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
