Programming in Java

Quiz
•
Computers
•
8th Grade
•
Medium
Adya Dalela
Used 474+ times
FREE Resource
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
Similar Resources on Wayground
15 questions
Python basics

Quiz
•
6th - 8th Grade
6 questions
Квиз

Quiz
•
7th - 11th Grade
10 questions
Programming Basics

Quiz
•
8th Grade
10 questions
Introduction To Java: Hello World

Quiz
•
7th - 12th Grade
11 questions
Python for Class 7

Quiz
•
7th - 8th Grade
15 questions
Python Basics

Quiz
•
KG - University
10 questions
Bài tập trắc nghiệm C++

Quiz
•
3rd - 12th Grade
10 questions
SC025 IQUA II

Quiz
•
1st - 10th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
15 questions
Acceptable Use Policy (Quiz)

Quiz
•
6th - 8th Grade
25 questions
Career Vs. Job

Quiz
•
6th - 8th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
20 questions
Copyright and Fair Use

Quiz
•
6th - 8th Grade
15 questions
Computer Components Video

Interactive video
•
8th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade