Search Header Logo

Java Using Math Functions

Authored by Sandeep M

Computers

9th Grade

Used 3+ times

Java Using Math Functions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which package has to be imported to use Java Math functions?

java.util.*

java.io.*

java.Mathematics.*

Already in java.lang package

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Java function is used to calculate square root of a number?

Math.square()
Math.pow()
Math.sqrt()
Math.root()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is return type of most Math functions in Java?

double
boolean
float
int

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Java statement is used to calculate 5 to the power 10?

Math.pow(5, 2)
Math.pow(5, 10)

Math.exp(5, 10)

Math.power(5, 10)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of Math.floor(3.7) ?

5.0

3.5

3.0

4.0

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output of Math.abs(-4) is:

-4.0

0

error

4.0

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What range of values does Math.random() function in Java return?

Between 0 (inclusive) and 100 (exclusive)

Between 1 (inclusive) and 10 (exclusive)

Between -1.0 (inclusive) and 1.0 (exclusive)
Between 0.0 (inclusive) and 1.0 (exclusive)

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?