Lab 17: Solar System III

4 Questions

Settings
Please wait...
Lab 17: Solar System III

For questions 1 to 3, consider the following code: class Player { String name; int pin; static nextNumber = 0; void Player(int id, String n) {   ; name = n;   ; nextNumber++;   ; pin = id * nextNumber; } &n


Questions and Answers
  • 1. 
    How many instances of the variable pin are there?
  • 2. 
    How many instances of nextNumber are there?
  • 3. 
    What would be returned by c.getPin();
  • 4. 
    Saying that computers are deterministic means that they are:
    • A. 

      Fast

    • B. 

      Not random

    • C. 

      Determined to finish the job

    • D. 

      Programmable