Java Basics: Trivia Questions Quiz! Exam

9 Questions | Attempts: 34
Share

SettingsSettingsSettings
Java Basics: Trivia Questions Quiz! Exam - Quiz

.


Questions and Answers
  • 1. 

    By convention, method names begin with an uppercase first letter, and all subsequent words in the name begin with a capital first letter.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    By convention, method names begin with a lowercase first letter and all subsequent words begin with a capital first letter.

    Rate this question:

  • 2. 

    Any class that contains public static void main (Strings [] args) can be used to execute an application.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 3. 

    A set of statements contained within a pair parenthesis is called a block.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    A set of statements contained within a pair of braces { } is called a block.

    Rate this question:

  • 4. 

    If an increment operator is ___________ to a variable, first the variable is incremented by 1, then its new value is used in the expression.

    Correct Answer
    prefixed
  • 5. 

    Instance variable of type  char, byte, short, int, long and double are all give the value ______ by default.

    Correct Answer
    Zero
    0
  • 6. 

    The _____ statement selects among multiple actions based on the possible values of an integer variable or expression.

    Correct Answer
    Switch
  • 7. 

    The expression ((x>y) && (a<b)) is true if either (x>y) is true or (a<b) is true.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    Both the expressions must be true when using the && operator.

    Rate this question:

  • 8. 

    List and tables or values can be stored in ________.

    Correct Answer
    arrays
    array
  • 9. 

    The number used to refer to a particular element of an array is called the element's __________.

    Correct Answer
    index

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 14, 2022
    Quiz Edited by
    ProProfs Editorial Team
  • Dec 20, 2013
    Quiz Created by
    Raonauman95
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.