Java Pop Quiz

Java Pop Quiz

9th - 12th Grade

7 Qs

quiz-placeholder

Similar activities

Java Quiz 1: Introduction

Java Quiz 1: Introduction

6th - 12th Grade

10 Qs

AP CSA Unit 1 & 2 Review

AP CSA Unit 1 & 2 Review

9th - 12th Grade

10 Qs

AP Warm UP 1

AP Warm UP 1

12th Grade

6 Qs

Java

Java

11th Grade

10 Qs

Computer Quiz(Java)(16-10-2020)

Computer Quiz(Java)(16-10-2020)

9th Grade

10 Qs

Programación

Programación

10th Grade

8 Qs

Sains Komputer Tingkatan 4 - 1.3.5 Penggunaan Penyataan

Sains Komputer Tingkatan 4 - 1.3.5 Penggunaan Penyataan

7th - 12th Grade

6 Qs

week 1 basic java coding language

week 1 basic java coding language

9th - 12th Grade

12 Qs

Java Pop Quiz

Java Pop Quiz

Assessment

Quiz

Created by

Jakobi Gorham

Computers

9th - 12th Grade

7 plays

Hard

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