MCQs on Java for Grade 8

MCQs on Java for Grade 8

9th Grade

50 Qs

quiz-placeholder

Similar activities

JavaScript

JavaScript

9th - 10th Grade

50 Qs

Python Review - PLTW CSE / Codecademy

Python Review - PLTW CSE / Codecademy

9th - 12th Grade

53 Qs

Intro to Computer Science Unit 2

Intro to Computer Science Unit 2

9th - 12th Grade

50 Qs

Python Coding Specialist Exam

Python Coding Specialist Exam

9th - 12th Grade

46 Qs

Python Assessment Year 8

Python Assessment Year 8

8th - 9th Grade

50 Qs

Week 6 - Input/Output Functions

Week 6 - Input/Output Functions

9th - 12th Grade

46 Qs

CS 241 Practice Test Week 3

CS 241 Practice Test Week 3

9th Grade - University

54 Qs

GCSE Python Legends

GCSE Python Legends

1st - 12th Grade

45 Qs

MCQs on Java for Grade 8

MCQs on Java for Grade 8

Assessment

Quiz

Computers

9th Grade

Hard

Created by

Swati Chilongia

Used 2+ times

FREE Resource

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to print output in Java?

print()

println()

printf()

All of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does System.out.println("Hello"); do?

Prints Hello and stays on same line

Prints Hello and moves to next line

Prints nothing

Gives an error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement prints text without moving to next line?

System.out.println()

System.out.print()

System.out.printf()

None of these

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of System.out.print("Hi "); System.out.print("There");?

Hi

There

Hi There

HiThere

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is NOT a valid way to display output?

System.out.print("Hello")

System.out.println("Hello")

System.print("Hello")

System.out.printf("Hello")

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is a correct way to declare an integer variable?

int x;

x int;

integer x;

var int x;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used to store decimal numbers?

int

float

String

char

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?