Search Header Logo

Java Fundamentals

Authored by Madhumitha S

Computers

9th Grade

Used 4+ times

Java Fundamentals
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

20 sec • 1 pt

A ________ in Java is a container that holds a value.

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

which of the following is a primitive data type in Java.

char

double

integer

string

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Explain the difference between '==' and 'equals()' in Java.

'==' compares content, 'equals()' compares reference.

'==' compares reference, 'equals()' compares reference.

'==' compares reference, 'equals()' compares content.

'==' compares content, 'equals()' compares reference and content.

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

How do you declare an array in Java?

int[] numbers;

numbers[] = new int[];

array numbers;

int numbers[];

5.

FILL IN THE BLANK QUESTION

20 sec • 1 pt

_______________ in Java is having multiple methods in the same class with the same name but different parameters.

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

How to define a class in Java.

void ClassName { // class body }

ClassName { // class body }

public class ClassName { // class body }

class ClassName { // class body }

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

How do you create a package in Java?

Create a new folder with the package name and place the Java file inside

Use a single class file for all your code

Define a package statement at the beginning of your Java file with the desired package name.

Add a 'package' keyword at the end of your Java file

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?