Java conditional/loop/method/user input

Java conditional/loop/method/user input

9th - 12th Grade

23 Qs

quiz-placeholder

Similar activities

Cyber Skills Quiz 1 - Y9

Cyber Skills Quiz 1 - Y9

9th Grade

19 Qs

TO PAS AIJ

TO PAS AIJ

11th Grade

20 Qs

Pointers

Pointers

12th Grade

20 Qs

Exam Style Questions

Exam Style Questions

10th - 11th Grade

18 Qs

Google Sheets

Google Sheets

12th Grade

21 Qs

12AIT - All About W3C <3

12AIT - All About W3C <3

10th Grade - University

18 Qs

Advantages and Disadvantages of Collecting Data

Advantages and Disadvantages of Collecting Data

10th Grade

20 Qs

Bài 13 Tin 10

Bài 13 Tin 10

1st - 12th Grade

18 Qs

Java conditional/loop/method/user input

Java conditional/loop/method/user input

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Medium

Created by

Indira Pothukuchi

Used 18+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

23 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

(int) (Math.random()*100) generates a random number between 0 and 100, including 0 and 100

True

False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following represents a single line comment in Java?

/* Comment */

<!-- Comment -->

// Comment

# Comment

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following represents a multi-line comment in Java?

<!-- Comment >

// Comment

/* Comment */

# Comment

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

public static _____ statement(int x, int y){

String z = "x is: " + x + "and y is: " + y;

return z }

What should the return type be?

void

int

double

String

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

public static ________ average(int x, int y){

return (double) x / y;

}

What should the return type be?

void

int

double

String

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

This is an example of a non-return method.

True

False

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

The name of this method is ....

Oddsum

int Oddsum

int Oddsum (int number)

return totaloddsum

Create a free account and access millions of resources

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?