Java Programming 1

10 Questions | Attempts: 326
Share

SettingsSettingsSettings
Java Programming 1 - Quiz

.


Questions and Answers
  • 1. 

    A Java application

    • A.

      May involve one or more classes.

    • B.

      Can be run on different platforms, not just on the one it was written on.

    • C.

      Both the above are true.

    Correct Answer
    C. Both the above are true.
  • 2. 

    A for loop is

    • A.

      An unconditional looping construct. It will loop for a predetermined number of times.

    • B.

      A conditional loop that will loop zero or more times.

    • C.

      A conditional loop that will loop one or more times.

    Correct Answer
    A. An unconditional looping construct. It will loop for a predetermined number of times.
  • 3. 

    A do...while loop is

    • A.

      An unconditional looping construct. It will loop for a predetermined number of times.

    • B.

      A conditional loop that will loop zero or more times.

    • C.

      A conditional loop that will loop one or more times.

    Correct Answer
    C. A conditional loop that will loop one or more times.
  • 4. 

    A while loop is an

    • A.

      An unconditional looping construct. It will loop for a predetermined number of times.

    • B.

      A conditional loop that will loop zero or more times.

    • C.

      A conditional loop that will loop one or more times.

    Correct Answer
    B. A conditional loop that will loop zero or more times.
  • 5. 

    An object is an instance of a class.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 6. 

    A class is the 'design' for many objects of that class.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 7. 

    A Java method

    • A.

      Always needs to be called 'main'.

    • B.

      May return a value to another method if it is not declared 'void'.

    • C.

      Both of the above are true.

    Correct Answer
    B. May return a value to another method if it is not declared 'void'.
  • 8. 

    Two ways of implementing a decision in Java are

    • A.

      'For' loops and 'if' structures

    • B.

      'If' structures and 'switch' structures

    • C.

      'For' loops and 'switch' structure

    Correct Answer
    B. 'If' structures and 'switch' structures
  • 9. 

    A Java class can have many methods.  These methods can be available to all instances of that class.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 10. 

    A Java method is a section of code that performs a particular function.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True

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 15, 2022
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 18, 2012
    Quiz Created by
    Marlenegalea
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.