Java Programming 2

10 Questions | Attempts: 240
Share
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. Which of the following outputs 'I love Java' on the screen?
Submit
Please wait...
About This Quiz
Java Programming Quizzes & Trivia

Personalize your quiz and earn a certificate with your name on it!
2. How would you declare a variable that will hold a single word and is called 'name'? In the same line place the value 'Jane' in this variable.
Submit
3. Which of the following creates and assigns an array of 10 marks that will hold whole numbers only?
Submit
4. Consider the loop below: for (i = 1; i < 11; i++){    System.out.println ("The counter is now reading " + i); }
Submit
5. A programmer has imported the Scanner class into his class and created an object of Scanner called 'input'.  Which of the following reads keyboard input and places it into the integer variable 'length'?
Submit
6. The class Shape has a method called 'findArea'.  shape1 is an object of class Shape.   Which of the following lines calls the method findArea for the object shape1?
Submit
7. How would you declare a variable that will hold a whole number and is called 'mark'?
Submit
8. What is the function of the following line? System.out.println (sqrt(x));
Submit
9. An array called markList holds ten marks.  Which is the correct code for outputting those marks on the screen?
Submit
10. The Math class can be made available to our class by importing it using the line:
Submit
View My Results

Quiz Review Timeline (Updated): Mar 15, 2022 +

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
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which of the following outputs 'I love Java' on the screen?
How would you declare a variable that will hold a single word and is...
Which of the following creates and assigns an array of 10 marks that...
Consider the loop below:...
A programmer has imported the Scanner class into his class and created...
The class Shape has a method called 'findArea'.  shape1...
How would you declare a variable that will hold a whole number and is...
What is the function of the following line?...
An array called markList holds ten marks.  Which is the correct...
The Math class can be made available to our class by importing it...
Alert!

Advertisement