Java Basics Quiz for CH/PT Students

Java Basics Quiz for CH/PT Students

University

16 Qs

quiz-placeholder

Similar activities

CLC Lesson 6 Quiz

CLC Lesson 6 Quiz

University

12 Qs

ITEC 70 - Quiz # 2

ITEC 70 - Quiz # 2

University

15 Qs

IntroductionDatabases

IntroductionDatabases

University

20 Qs

Структурированный тип данных массив

Структурированный тип данных массив

10th Grade - University

11 Qs

G4-Microprocessors and Their Uses

G4-Microprocessors and Their Uses

4th Grade - University

15 Qs

Uji Pengetahuan Teknologi Informasi

Uji Pengetahuan Teknologi Informasi

9th Grade - University

20 Qs

The Linux Vault

The Linux Vault

University

15 Qs

OperationsManagementMCQ1

OperationsManagementMCQ1

University

20 Qs

Java Basics Quiz for CH/PT Students

Java Basics Quiz for CH/PT Students

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Medium

Created by

Geshani ITUM

Used 24+ times

FREE Resource

AI

Enhance your content in a minute

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

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 5 pts

What does System.out.println() do?

Takes user input

Outputs text to the console

Ends a program

None of the above

2.

MULTIPLE CHOICE QUESTION

20 sec • 5 pts

Which keyword is used to define a class in Java?

class

define

struct

object

3.

MULTIPLE CHOICE QUESTION

20 sec • 5 pts

What is the purpose of the public keyword in Java?

It hides the method or class from other classes.

It allows the method or class to be accessed from outside.

It specifies that the method is private.

None of the above.

4.

MULTIPLE CHOICE QUESTION

20 sec • 5 pts

Which of the following is a correct way to declare a variable in Java?

int 1x = 10;

int x = 10;

integer x = 10;

num x = 10;

5.

MULTIPLE CHOICE QUESTION

20 sec • 5 pts

Which data type is used to store a single character in Java?

char

String

int

boolean

6.

MULTIPLE CHOICE QUESTION

20 sec • 5 pts

What will be the value of the variable z after executing the code below? int x = 5, y = 10; int z = x + y;

5

10

15

50

7.

MULTIPLE CHOICE QUESTION

20 sec • 5 pts

What will be the result of the following code? int a = 10, b = 3; System.out.println(a % b);

1

3

10

0

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?