Search Header Logo
Introduction to JAVA

Introduction to JAVA

Assessment

Presentation

Instructional Technology

8th Grade

Practice Problem

Medium

Created by

Klea h

Used 6+ times

FREE Resource

20 Slides • 20 Questions

1

Untitled Lesson

By Klea h

media

2

media

3

media

​Many companies rely on Java including tech giants like Amazon, Netflix, and Google, as well as companies like Airbnb, eBay, Spotify, and Uber.
The core coding language that Minecraft uses is also Java.

media

4

Multiple Choice

What is Java primarily used for?

1
Java is primarily used for data analysis.
2

Java is primarily used for web, mobile, and game development

3

Java is primarily used for editing photos.

4
Java is primarily used for web design.

5

Multiple Choice

Which of these game is coded in Java?

1

Super Mario

2

Minecraft

3

Roblox

4

GTA5

6

media

7

Multiple Choice

What must match the filename in a Java program?

1

Method name

2

Variable name

3

Comment

4

Class name

8

media
media

9

Multiple Select

Which of the following is a Java keyword? Select 2

1
function
2

Simple

3
class
4

public

10

Multiple Choice

What is the standard practice for naming classes in Java?

1
Use CamelCase for class names, starting each word with an uppercase letter.
2
Use lowercase letters for class names.
3
Start class names with a number.
4

Use underscores to separate words in class names and start with lowercase.

11

media

12

Multiple Choice

Which method is required in every Java program?

1
public void start(String[] args)
2
void main(String[] args)
3
public static void main(String[] args)
4
static void main(String args)

13

media

14

Multiple Choice

What is the difference between System.out.print() and System.out.println()?

1

There is no difference

2

println() moves to the next line

3

print() adds a new line

4

println() doesn’t show anything

15

media

16

Multiple Choice

What happens if you forget to use quotation marks when printing text?

1
The program will run without any issues.
2
The text will be printed as is without errors.
3
You will receive a warning but no error.
4
You will encounter a syntax error or an undefined variable error.

17

media

18

Multiple Choice

Which symbol is used for a single-line comment?

1
/*
2
//
3
#
4

\\

19

Multiple Choice

Select the correct block comment:

1

/* This is a block comment. This comment continues in multiple lines. */

2

// This is a block comment. This comment continues in multiple lines.

3

#This is a block comment. This comment continues in multiple lines. #

4

/* This is a block comment. This comment continues in multiple lines.

20

media

21

Multiple Choice

Which is a correct way to declare an integer in Java?

1
integer myNumber;
2

int myNumber;

3
myNumber: int;
4

int myNumber

22

media

23

Multiple Choice

What is the correct way to initialize a variable that was already declared?

1

double = 3.14;

2

double pi= 3.14;

3

pi double = 3.14;

4

pi = 3.14;

24

media

25

Multiple Choice

Which of the following is a valid variable name in Java?

1
variable-name
2
variable!
3
1variable
4
variable1

26

Multiple Choice

Is myScore different from MyScore?

1
myVar and MyVar are different variables.
2
myVar and MyVar are the same variable.
3
myVar is a constant and MyVar is a variable.
4
myVar is a function while MyVar is a string.

27

media

28

Multiple Choice

What keyword is used to declare a constant in Java?

1
constant
2
static
3

public

4
final

29

Multiple Choice

How should the name of a constant variable be written?

1
Use camelCase with no spaces.
2
Use lowercase letters only.
3
Use mixed case with dashes for separation.
4
Use ALL_CAPS with underscores for separation.

30

media

31

media

32

Multiple Choice

What operator is used to combine strings in Java?

1
%
2
&
3
|
4
+

33

media

34

Multiple Choice

What will this code display?

int number = 10;

System.out.println("Value: " + number);

1
Value: 10.0
2
Value: 11
3
Value: ten
4
Value: 10

35

media

36

media

37

Multiple Choice

What must be added at the top of your Java file to use Scanner?

1
import java.util.Scanner;
2
import scanner.java.util;
3
import java.io.Scanner;
4
import java.util.ScannerUtil;

38

Multiple Choice

What method is used to read a whole line of text?

1

input.get()

2

scanner.input();

3

keyboard.nextLine();

4

keyboard.next()

39

media

CLASSWORK & HOMEWORK:

Untitled Lesson

By Klea h

media

Show answer

Auto Play

Slide 1 / 40

SLIDE