Skip To Content

Athabasca University

Review Questions

  1. What other tutorials are available from the Sun website?
  2. What is the skeleton for any Java program?
  3. What is the entry point for any Java application?
  4. What is the function of the import statement?
  5. What are some of the benefits gained by using a coding standard?
  6. Which of the following are valid variable names in Java?
    _object
      object-oriented
      object_oriented
      object.oriented
      $java
      Java
      Integer
      String
      Int
      933
      fm90.5
      1fm
  7. What is the order of precedence among arithmetic operators?
  8. What is the difference in assignment between primitives and objects?
  9. What is aliasing?
  10. What are arithmetic operators?
  11. How do auto pre-increment, pre-decrement, post-increment, and post-decrement work?
  12. What are the relational operators?
  13. How does one test for object equivalence?
  14. What are the logical operators?
  15. What are the bitwise operators?
  16. What is the shift operator?
  17. What is the function of the string + operator?
  18. How does explicit casting work in Java?
  19. How are literals used to specify type in Java?
  20. What are the two basic forms of “if”?
  21. How does “while” differ from “do-while”?
  22. What is unique to the “for” statement with regard to defining variables?
  23. How are “break” and “continue” used in Java?
  24. How is “break” used within “switch”?
  25. What is the purpose of a constructor?
  26. How are overloaded methods distinguished from each other?
  27. What is a default constructor?
  28. How is the keyword “this” used in Java?
  29. What is the purpose of “finalize”?
  30. Why is “finalize” not as good as a destructor?
  31. Why must one perform a clean-up?
  32. What are the initial values of the primitives that are encapsulated in an object, and what are the initial values of the primitives that are not encapsulated in an object?
  33. What is the advantage of constructor initialization?
  34. When are variables in an object initialized?
  35. What are the steps in the process of creating an object?
  36. What is an explicit static initialization?
  37. What is a non-static instance initialization?
  38. What is the advantage of bounds checking?
  39. What is an array of handles?
  40. What is encapsulation? How does encapsulation contribute to software maintainability?
  41. How would you enhance the following code to achieve the desired effect of encapsulation? What is the trade-off of your enhancement? What are its advantages?
      class time {
        int hour;
        int minute;
        time() {};
    
        public static void main (String arg[]) {
          time t = new time();
          t.hour = 3;
          t.minute = 25;
          System.out.println("The time now is "+t.hour+":"+t.minute);
        }
      }
  42. What is the advantage of inheritance in development work?

Updated July 30 2020 by FST Course Production Staff