Java Basics Quiz for CH/PT Students

Java Basics Quiz for CH/PT Students

University

16 Qs

quiz-placeholder

Similar activities

Aula07 - Matrizes

Aula07 - Matrizes

University

12 Qs

Mid Exam

Mid Exam

12th Grade - University

20 Qs

OSS (QUIZ 1) Introduction to Operating Systems

OSS (QUIZ 1) Introduction to Operating Systems

University

20 Qs

KUIS TIK

KUIS TIK

9th Grade - University

20 Qs

Data Security

Data Security

12th Grade - University

17 Qs

ASESMEN DIAGNOSTIK INFORMATIKA KELAS 9

ASESMEN DIAGNOSTIK INFORMATIKA KELAS 9

9th Grade - University

20 Qs

FINALS summative test in TRENDS

FINALS summative test in TRENDS

12th Grade - University

20 Qs

Web Application - PHP Repetition

Web Application - PHP Repetition

University

15 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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?