Logo
search
menuicon
High grade 11 Others

High grade 11 Others

Jam
k-pop 보이그룹 작업실
quiz thumbnail
Freestyle
High 11
Others

High grade 11 Others

avatar

Jam

2

5 questions

Allow incorrect answer

Show answer

public quiz

# 1Multiple Choice
Which Java class must be imported to use functions like square root and exponents?
java.util.Scanner
java.lang.Math
java.io.Math
java.lang.String
# 2Multiple Choice
What is the correct Java syntax to calculate the square root of a number?
Math.power(num, 0.5)
Math.sqroot(num)
Math.sqrt(double num)
Math.root(num, 2)
# 3Multiple Choice
When calculating the hypotenuse, why should the variable be stored as a double rather than an int?
Using an int could cause problems since triangle sides are often decimal values.
Java does not allow int variables to be printed with String messages.
double variables use less memory than int variables.
Integers cannot be used in the Math.pow method.
# 4Multiple Choice
According to the text, what is the default execution order of code in a Java program?
It executes randomly based on available memory.
It executes from the bottom of the class to the top.
It executes all math operations first, then all String operations.
It executes sequentially (Line 1, then Line 2, and so on).
Want to see all 5 questions?
Join ZEP QUIZ to access 800,000+ quizzes for free.Log in and explore them all.