• 1. 
    A class that is inherited is called a ______ .

  • superclass
  • Subclass
  • subsetclass
  • Relativeclass
  • 2. 
    String s = "good job".substring(3, 9);What is the value of s?

  • "d job"
  • "od job"
  • "d jo"
  • "od jo"
  • StringIndexOutOfBoundsException
  • 3. 
    The keyword "method" is another name for

  • an object
  • a class
  • a function
  • a variable
  • 4. 
    How will you identify a single array?

  • single curly brackets
  • single square brackets
  • multiple squares brackets
  • single angled brackets
  • 5. 
    How would you declare a variable storing the tax rate?

  • int taxRate = 5.1;
  • taxRate = "5.1";
  • double taxRate = 5.1;
  • double taxRate = "5.1";
  • I do hereby declare thee Sir Tax Rate
  • 6. 
    What will be the value in variable x after this code segment is executed?int x = 5.0 + 2;

  • 7
  • 7.0
  • There will be a runtime error
  • There will be a syntax error
  • 5.02
  • 7. 
    When we want to print in Java, we use the code ......

  • system.out.print();
  • System.out.println();
  • System.Out.Printf();
  • System.out.show();
  • 8. 
    Which of the following statements is invalid?

  • Tutor jimmy = new CSTutor();
  • CSTutor sally = new JavaTutor();
  • Tutor suzie = new JavaTutor();
  • Tutor johnny = new Tutor();
  • 9. 
    Java was originally named:

  • Coffee
  • Oak
  • New C++
  • Duke
  • 10. 
    This statement causes a loop to terminate early.

  • a. continue
  • b. break
  • c. switch
  • d. none of the above
  • 11. 
    Decide if the boolean expression evaluates to true or false. Given:a = 1, b = 0, c = 3a == b

  • true
  • false
  • 12. 
    What is the keyword "final" used for in Java?

  • identify a constant
  • identify an integer
  • identify a string
  • Identify a final answer
  • 13. 
    A variable that holds a decimal number

  • String
  • boolean
  • int
  • float
  • 14. 
    String s = "whatever".substring(1,4);What is the value of s?

  • "hate"
  • "hat"
  • "whate"
  • "what"
  • StringIndexOutOfBoundsException
  • 15. 
    Which of the following is an example of a reference variable declaration?

  • int count;
  • String name;
  • float gpa;
  • char firstInitial;
  • 16. 
    Which of the following is NOT a numeric data type

  • int
  • double
  • float
  • decimal
Report Question
warning
access_time
  Time