Java Basics Quiz for CH/PT Students

Java Basics Quiz for CH/PT Students

University

16 Qs

quiz-placeholder

Similar activities

Getting Familiar with GIT and GITHUB

Getting Familiar with GIT and GITHUB

University

15 Qs

Python_MCQ_2

Python_MCQ_2

University

15 Qs

Python: operadores y tipos de datos

Python: operadores y tipos de datos

University

18 Qs

P3 IAS 2 Quiz

P3 IAS 2 Quiz

University

15 Qs

Keyboard Shortcuts

Keyboard Shortcuts

5th Grade - University

11 Qs

SCM-PreQuiz

SCM-PreQuiz

University

20 Qs

CLC Lesson 4&5 Quiz

CLC Lesson 4&5 Quiz

University

12 Qs

Java_Quiz_Part_2

Java_Quiz_Part_2

University

12 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

Create a free account and access millions of resources

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?