placeholder image to represent content

CS 141 Final Exam Competition

Quiz by Jenna Yee

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

Correct quiz answers unlock more play!

New Quizalize solo game modes
20 questions
Show answers
  • Q1

    __________ provides an integrated development environment for rapidly developing Java programs. Editing, compiling, building, debugging, and online help are integrated in one graphical user interface.

    Java API

    Java language specification

    Java IDE

    Java JDK

    45s
  • Q2

    If you forget to put a closing quotation mark on a string, what kind of error will be raised?

    a runtime error

    a logic error

    a compile error

    45s
  • Q3

    Which of the following are correct names for variables according to Java naming conventions?

    Radius

    radius

    CircleRadius

    RADIUS

    45s
  • Q4

    Every letter in a Java keyword is in lowercase?

    false

    true

    45s
  • Q5

    To assign a value 1 to variable x, you write

    x==1

    x := 1;

    x = 1;

    1 = x;

    1 := x;

    45s
  • Q6

    25 % 1 is ____

    0

    3

    1

    5

    4

    2

    45s
  • Q7

    Math.pow(4, 1 / 2) returns _____

    2

    1

    0

    1.0

    2.0

    45s
  • Q8

    What is the value of (double)(5/2)?

    3.0

    2.0

    2.5

    2

    3

    45s
  • Q9

    What does the following expression evaluate to? 2354 + 5 + "2" + 7 + (1 + 2)

    "2359210"

    "2359273"

    "23545273"

    2359273

    "235452712"

    45s
  • Q10

    Assume x = 4 and y = 5, which of the following is true?

    x != 5 ^ y != 4

    !(x == 4) ^ y != 5

    x != 4 ^ y == 5

    x == 5 ^ y == 4

    45s
  • Q11

    Assume x= 4, which of the following is true?

    x == 5

    x != 4

    !(x == 4)

    x != 5

    45s
  • Q12

    What is Math.round(4.7)?

    4.0

    5

    5.0

    4

    45s
  • Q13

    What is Math.ceil(10.7)?

    10.0

    10

    11.0

    11

    45s
  • Q14

    Will System.out.println((char)4) display 4?

    No

    Yes

    45s
  • Q15

    Suppose s1 and s2 are two strings. Which of the following statements or expressions is correct?

    boolean b = s1.compareTo(s2);

    char c = s1.charAt(s1.length());

    char c = s1[0];

    String s3 = s1 - s2;

    s1 = s2;

    45s

Teachers give this quiz to your class