Java Test 2 Section 1

5 Questions | Attempts: 73
Share

SettingsSettingsSettings
Java Quizzes & Trivia

This section consists of 5 multiple choices.


Questions and Answers
  • 1. 

    Which of the following is not a primitive data type in Java

    • A.

      String

    • B.

      Int

    • C.

      Double

    • D.

      Boolean

    Correct Answer
    A. String
  • 2. 

    The implementation of a class consists of two types of members: ________ member and _______ member

    • A.

      Data and option

    • B.

      Information and method

    • C.

      Data and method

    • D.

      Information and option

    Correct Answer
    C. Data and method
  • 3. 

    In a class, the data members should always be ____________ to make the data members accessibly only by methods of the same class while the method members are usually ________ and are accessible from outside the class.

    • A.

      Public, public

    • B.

      Private, public

    • C.

      Private, protected

    • D.

      Private, private

    Correct Answer
    B. Private, public
  • 4. 

    +, -, *, /, and % are called ___________ operators

    • A.

      Logical

    • B.

      Assignment

    • C.

      Arithmetic

    • D.

      Unary

    Correct Answer
    C. Arithmetic
  • 5. 

    =, +=, -=, *=, /=, and %= are called ___________ operators.

    • A.

      Logical

    • B.

      Assignment

    • C.

      Arithmetic

    • D.

      Unary

    Correct Answer
    B. Assignment

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 20, 2022
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 28, 2009
    Quiz Created by
    Yupeilin
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.