Java Basics Quiz for CH/PT Students

Java Basics Quiz for CH/PT Students

University

16 Qs

quiz-placeholder

Similar activities

Database 1

Database 1

University

20 Qs

OSS (QUIZ 7) Input/Output Systems

OSS (QUIZ 7) Input/Output Systems

University

20 Qs

Borders and Shades in Word 2010 Quiz

Borders and Shades in Word 2010 Quiz

10th Grade - University

12 Qs

Workshop_quiz_on Sk-learn

Workshop_quiz_on Sk-learn

University

15 Qs

Q1 DPM overview

Q1 DPM overview

University

11 Qs

Data Literacy Quizizz

Data Literacy Quizizz

6th Grade - University

15 Qs

PPL 223 - (QUIZ 3) Data Types and Structures

PPL 223 - (QUIZ 3) Data Types and Structures

University

15 Qs

1.4 Logic Gate and Simple Logic Circuit

1.4 Logic Gate and Simple Logic Circuit

12th Grade - University

13 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?