Java Pop Quiz

Java Pop Quiz

9th - 12th Grade

7 Qs

quiz-placeholder

Similar activities

C# lesson10

C# lesson10

1st - 10th Grade

10 Qs

=NOW()

=NOW()

11th Grade

10 Qs

HTML & Google Site Seatwork

HTML & Google Site Seatwork

12th Grade

10 Qs

1. Berpikir Komputasional (Sosial Murni)

1. Berpikir Komputasional (Sosial Murni)

11th Grade

10 Qs

Python Fundamentals -2

Python Fundamentals -2

11th - 12th Grade

10 Qs

Konsep Routing

Konsep Routing

1st - 10th Grade

10 Qs

Binary

Binary

6th - 9th Grade

11 Qs

ICT as Social Change

ICT as Social Change

12th Grade

10 Qs

Java Pop Quiz

Java Pop Quiz

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Jakobi Gorham

Used 7+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Media Image

Identify types of error that exist in this method program:-

Logic error

runtime error

syntax error