placeholder image to represent content

Java: Math & String

Quiz by Michael Engel

Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

New Quizalize solo game modes
26 questions
Show answers
  • Q1
    What will be the value of Math.ceil(4.2)?
    5
    6
    4
    4.2
    30s
  • Q2
    What will be the value of Math.pow(2, 3)?
    2
    6
    3
    8
    30s
  • Q3
    What will be the value of Math.random() * 10?
    10
    a random number between 1 and 10
    0
    a random number between 0 and 10
    30s
  • Q4
    What will be the value of Math.abs(-5.8)?
    -5.8
    0
    5
    5.8
    30s
  • Q5
    What will be the value of Math.floor(7.9)?
    6
    7
    8
    7.9
    30s
  • Q6
    What will be the value of Math.sqrt(25)?
    25
    5
    1
    0
    30s
  • Q7
    What will be the value of Math.round(6.7)?
    6
    0
    7
    6.7
    30s
  • Q8
    What will be the value of Math.floor(Math.random() * 100)?
    A random integer between 0 and 99
    100
    A random decimal between 0 and 100
    0
    30s
  • Q9
    Which method can be used to calculate the largest integer less than or equal to a given number in Java?
    Math.floor()
    Math.round()
    Math.ceil()
    Math.random()
    30s
  • Q10
    Which method can be used to calculate the power of a number in Java?
    Math.random()
    Math.pow()
    Math.sqrt()
    Math.abs()
    30s
  • Q11
    Which method can be used to generate a random number between 0.0 (inclusive) and 1.0 (exclusive) in Java?
    Math.abs()
    Math.round()
    Math.random()
    Math.ceil()
    30s
  • Q12
    Which method can be used to calculate the maximum value between two numbers in Java?
    Math.abs()
    Math.min()
    Math.max()
    Math.random()
    30s
  • Q13
    Which method can be used to round a number to the nearest integer in Java?
    Math.floor()
    Math.round()
    Math.random()
    Math.ceil()
    30s
  • Q14
    Which method can be used to find the absolute value of a number in Java?
    Math.abs()
    Math.floor()
    Math.ceil()
    Math.max()
    30s
  • Q15
    Which method can be used to calculate the square root of a number in Java?
    Math.pow()
    Math.abs()
    Math.random()
    Math.sqrt()
    30s

Teachers give this quiz to your class