Programming in Java

Programming in Java

8th Grade

10 Qs

quiz-placeholder

Similar activities

Sains Komputer Tingkatan 4 - 1.3.5 Penggunaan Penyataan

Sains Komputer Tingkatan 4 - 1.3.5 Penggunaan Penyataan

7th - 12th Grade

6 Qs

Java 4

Java 4

7th - 12th Grade

9 Qs

MK Java for-Loop Quiz 2

MK Java for-Loop Quiz 2

8th - 12th Grade

10 Qs

C++ Functions

C++ Functions

6th - 8th Grade

11 Qs

Java Quiz 1: Introduction

Java Quiz 1: Introduction

6th - 12th Grade

10 Qs

recupero informatica 3a liceo ballerini

recupero informatica 3a liceo ballerini

8th Grade

9 Qs

Arduino Programming

Arduino Programming

7th - 12th Grade

12 Qs

JAVA: Level-1

JAVA: Level-1

5th - 12th Grade

15 Qs

Programming in Java

Programming in Java

Assessment

Quiz

Computers

8th Grade

Medium

Created by

Adya Dalela

Used 472+ 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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?