Java Basics Quiz for Grade 1

Java Basics Quiz for Grade 1

1st Grade

9 Qs

quiz-placeholder

Similar activities

PE2 Module 3

PE2 Module 3

KG - Professional Development

11 Qs

CodeHS Arraylist

CodeHS Arraylist

1st Grade

10 Qs

JAVA-STRINGS-VLITS

JAVA-STRINGS-VLITS

1st Grade

13 Qs

INTRODUCTION TO OOP

INTRODUCTION TO OOP

1st - 3rd Grade

10 Qs

PBO 3.1

PBO 3.1

1st Grade

10 Qs

Aibles javascript quiz

Aibles javascript quiz

1st Grade

10 Qs

Komputer

Komputer

1st Grade - University

11 Qs

Programación Java

Programación Java

1st Grade

10 Qs

Java Basics Quiz for Grade 1

Java Basics Quiz for Grade 1

Assessment

Quiz

Computers

1st Grade

Easy

Created by

Computing Man

Used 1+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is Java?

A type of coffee

A type of car

A type of fruit

A high-level programming language

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of 2 + 3 in Java?

6

4

5

7

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a variable in Java?

data_type variable_name;

int variable_name;

variable_name = new data_type();

variable_name = data_type;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the keyword used to define a class in Java?

class

method

type

category

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'public' keyword in Java?

To restrict access to a method, class, or field

To make a method, class, or field accessible only within the same package

To declare that a method, class, or field can be accessed by any other code.

To hide a method, class, or field from other classes

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between '==' and 'equals()' in Java?

The '==' operator is used to compare the contents of two objects, while the 'equals()' method is used to compare the values of two objects.

The '==' operator is used to assign values to objects, while the 'equals()' method is used to check for null values in objects.

The '==' operator is used to compare the values of two objects, while the 'equals()' method is used to compare the contents of two objects.

The '==' operator is used to check for null values in objects, while the 'equals()' method is used to compare the references of two objects.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the use of 'System.out.println()' in Java?

To create a new object

To perform mathematical calculations

To read input from the keyboard

To print the output to the console

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between 'int' and 'String' in Java?

int stores string values and String stores integer values

int is used for floating point numbers and String is used for whole numbers

int stores integer values and String stores a sequence of characters

int is a data type and String is a method in Java

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a new object in Java?

initialize ClassName()

make new ClassName()

create ClassName()

new ClassName()