Java 1.1 to 2.1

Java 1.1 to 2.1

12th Grade

16 Qs

quiz-placeholder

Similar activities

Brawl Stars

Brawl Stars

KG - Professional Development

14 Qs

Atletik

Atletik

10th - 12th Grade

20 Qs

Alberta Natural Resources #2

Alberta Natural Resources #2

KG - University

12 Qs

Permit Practice Test Part 2

Permit Practice Test Part 2

12th Grade

20 Qs

Cougar Cafe Trivia 8.27.2021

Cougar Cafe Trivia 8.27.2021

9th - 12th Grade

20 Qs

U4: Equipment Check #4.3: Vocabulary Debrief #2

U4: Equipment Check #4.3: Vocabulary Debrief #2

11th - 12th Grade

15 Qs

MECHATRONICS DESIGN SYSTEM

MECHATRONICS DESIGN SYSTEM

10th - 12th Grade

11 Qs

Iron Man

Iron Man

1st Grade - University

12 Qs

Java 1.1 to 2.1

Java 1.1 to 2.1

Assessment

Quiz

Other

12th Grade

Practice Problem

Hard

Created by

PRESTON COLE

Used 1+ 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

30 sec • 1 pt

Topic 1.1: Describe the use of main in a Java app

Imagine you're a wizard in the magical world of Java. What's the right spell to summon an instance of your own class in the main function?

MyClass myObject = new MyClass();

MyClass myObject = MyClass();

myObject = MyClass.new;

new myObject = MyClass();

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Topic 1.1: Describe the use of main in a Java app

How can you pass command-line arguments when running a Java application?

Separate them by commas

Put them in square brackets

Separate them by spaces

Enclose them in double quotes

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Topic 1.2: Perform basic input and output using standard packages

  1. Which method of the Scanner class reads a whole line from standard input?

readLine()
nextLine()
read()
next()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Topic 1.2: Perform basic input and output using standard packages

Which import statement is necessary for using Scanner class?

import java.util.Scanner;
import java.util.Input;
import java.util.Output;
import java.util.IO;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Topic 1.3: Evaluate the scope of a variable

  1. What will be the scope of a variable declared inside a for-loop?

Class scope

Instance scope

Block scope
Function scope

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Topic 1.3: Evaluate the scope of a variable

What happens if you try to access a local int variable before it's initialized?

A runtime error occurs

The variable will be automatically initialized to the default value for an int, which is 0.

A compilation error occurs

None of the above

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Topic 1.4: Comment and document programs

  1. Which symbol marks the beginning of a Javadoc comment?

/*
/**
//
#

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?