Quiz Over Java Practice Quiz Questions

3 Questions | Total Attempts: 580

SettingsSettingsSettings
Please wait...
Java Quizzes & Trivia

Answer all the questions.


Questions and Answers
  • 1. 
    What is Java?
    • A. 

      Programming language

    • B. 

      Platform

    • C. 

      Programming language & Platform

    • D. 

      None

  • 2. 
    Int values[] = {1,2,3,4,5,6,7,8};  for(int i=0;i< X; ++i)  System.out.println(values[i]);  Referring to the above, what value for X will print all members of array "values"? 
    • A. 

      1

    • B. 

      7

    • C. 

      8

    • D. 

      9

    • E. 

      None

  • 3. 
    Which code declares class A to belong to the mypackage.financial package
    • A. 

      Package mypackage; package financial;

    • B. 

      Import mypackage.*;

    • C. 

      Package mypackage.financial.A;

    • D. 

      Import mypackage.financial.*;

    • E. 

      Package mypackage.financial;