Java conditional/loop/method/user input

Java conditional/loop/method/user input

9th - 12th Grade

23 Qs

quiz-placeholder

Similar activities

AP Computer Science A Unit 1

AP Computer Science A Unit 1

9th - 12th Grade

19 Qs

JAVA FUNDAMENTALS

JAVA FUNDAMENTALS

9th - 12th Grade

20 Qs

Mock Test UPS1

Mock Test UPS1

12th Grade

20 Qs

CSII Fall Final Review

CSII Fall Final Review

12th Grade

20 Qs

Basics Python

Basics Python

8th - 10th Grade

20 Qs

Week 6 - CP1

Week 6 - CP1

12th Grade

20 Qs

Python variables and operators quiz

Python variables and operators quiz

9th - 12th Grade

20 Qs

Lessons11 - 15 CSA

Lessons11 - 15 CSA

10th - 12th Grade

19 Qs

Java conditional/loop/method/user input

Java conditional/loop/method/user input

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Indira Pothukuchi

Used 15+ times

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?