Java Fundamentals

Java Fundamentals

9th Grade

20 Qs

quiz-placeholder

Similar activities

Computer 10 | Introduction to Java

Computer 10 | Introduction to Java

9th - 12th Grade

20 Qs

JAVA FUNDAMENTALS

JAVA FUNDAMENTALS

9th - 12th Grade

20 Qs

Java Chapter 1 CS2

Java Chapter 1 CS2

9th - 12th Grade

16 Qs

8.12 C++ Test on Classes

8.12 C++ Test on Classes

9th - 12th Grade

15 Qs

STATIC KEYWORD IN JAVA

STATIC KEYWORD IN JAVA

9th - 12th Grade

18 Qs

UTS DASPRO

UTS DASPRO

1st - 10th Grade

20 Qs

JAVA: Level-1

JAVA: Level-1

5th - 12th Grade

15 Qs

Java Review 2

Java Review 2

9th - 12th Grade

20 Qs

Java Fundamentals

Java Fundamentals

Assessment

Quiz

Computers

9th Grade

Hard

Created by

Madhumitha S

Used 3+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?