1. The “building blocks” that Java programmers use to write computer programs are called ______.
  2. A method is a sequence of ______that accesses the date of an object.
  3. In Java, objects within the same class share common ______?
  4. You can invoke the println and print methods on what objects?
  5. What is a storage location in the computer’s memory called that has a type, name, and contents?
  6. What term is used to describe the name of a variable, method, or class?
  7. What are the rules for valid identifiers?
  8. What is camel case?
  9. By convention among Java programmers, variables begin with a(n) ______.
  10. By convention among Java programmers, class names begin with a(n) ______.
  11. What would be a good choice for a variable identifier that will store a name?
  12. In Java, a(n) ______specifies the kind of values that can be stored in a variable.
  13. What is the name of the type that denotes floating-point numbers that can have fractional parts?
  14. What is the name of the type that denotes whole numbers?
  15. What is the name of the type that denotes a string of characters?
  16. Which type would be used to declare a variable that will store a welcome message?
  17. Which type would be used to declare a variable that will store a measurement with fractional parts?
  18. What type would be used to declare a variable that will store a whole number?
  19. In Java, a comment on a line begins with which characters?
  20. What term is used to refer to text in a program that is an explanation for human readers of the code?
  21. The Java compiler ignores any text between ______.
  22. What is the name of the = operator in Java?
  23. What is the purpose of the assignment operator?
  24. How do we write a statement that stores an integer value in a variable?
  25. How do we write a statement that declares and stores an integer value in a variable?
  26. How do we write a statement to change the value that is already stored in a variable?
  27. How do we write a statement to add 10 to the value already stored in a variable?
  28. What is an object?
  29. The type of an object is given by its ______?
  30. “System.out” is an object of which class?
  31. What is a method?
  32. What is a class?
  33. What are the methods of the String class?
  34. If greeting is a String object, what is an example of an incorrect method call on greeting?
  35. What is the term used to specify the collection of things you can do with objects that belong to a class?
  36. A method name is ______if a class has more than one method with that number (but different parameter types).
  37. The input to a method is called a(n) ______.
  38. What are the two types of methods?
  39. Input to a method, enclosed in the parentheses after the method name, is known as ______.
  40. How would a method call that represents the invocation of a method that does not have arguments appear?
  41. The value calculated by a method is called its ______value.
  42. Can a method have more than one method?
  43. How would a method class that uses the return value of a method as an argument appear?
  44. What is the declared return type for a method that does not have a return value?
  45. What is the syntax of a method declaration with a void return type?
  46. What methods do we know with a void return type?
  47. Which operator constructs object instances?
  48. Write a statement to construct a circle of radius 3.
  49. Write a statement that declares a variable that references a circle of radius 3.
  50. Write a statement that calls a constructor with no construction arguments.
  51. What terminology describes a method that returns information about an object and does not change the object’s internal data?
  52. What terminology describes a method of an object that modifies that object’s internal data?
  53. What are the mutator methods for the Rectangle class?
  54. What does API stand for?
  55. A(n) ______is a collection of classes with a related purpose.
  56. To use a class in another package you need to ______it.
  57. What package(s) are automatically imported in any Java program.
  58. Which classes are included in the java.lang package?
  59. Write a statement to allows us to use the Rectangle class.
  60. Which method could you use to obtain the string “1234567890” from the string “123-456-7890”?
  61. What is the purpose of a test program?
  62. Which term denotes the memory locations of an object?
  63. What do object variables store (in general)?
  64. Assuming the following Java statement: Circle c1 = new Circle(3);
    What does the variable c1 store?
  65. Assuming the following Java statement: intnum = 10;
    What does the variable num store?
  66. Assume that the class Circle has an accessor called getRadius and a mutator called setRadius. What is the output of the following code:
    Circle c1 = new Circle(3);
    Circle c2 = c1;
    c1.setRadius(4);
    System.out.println(c2.getradius());?
  67. What is the output of the following code:
    Circle c1 = new Circle (3);
    Circle c2 = new Circle (3):
    c1.setRadius(4);
    System.out.println(c2.getRadius());?
  68. What is the output of the following code:
    int num1 = 6;
    int num2 = num1;
    num2 = num2 + 10;
    System.out.println(num1);?
  69. What is the output of the following code:
    int num1 = 6;
    int num2 = 10;
    num1 = num2;
    num2 = num1;
    System.out.println(num1 + “, “ + num2);?
  70. What is the output of the following code:
    int num1 = 6;
    int num2 = 10;
    num1 = num1 + num2;
    num2 = num1 + num2;
    System.out.println(num1 + “, “ + num2);?
  71. Complete the code fragment to ensure that the frame is shown:
    JFrame frame = new JFrame();.
  72. The setVisible method of the Jframe class returns what kind of argument?
  73. Write a code fragment that declares and constructs a new JFrame window and sets the width to 400 and the height to 200.
  74. Complete the code fragment to set the title of the frame to “An Empty Frame”
    JFrame frame = new JFrame();.
  75. What is the nickname for the graphical user interface library in Java?
  76. Drawing instructions should be placed inside the ______method, which is called whenever the component needs to be repainted.
  77. Complete the following statement, which constructs an ellipse.
    Ellipse2D.Double ellipse = new ______(x, y, width, height);
  1. In the code below, write a statement that sets the graphic to green.
    public class ItalianFlagComponent extends JComponent
    {
    public void paintComponent(Graphics g)
    {
    Graphics2D g2 = (Graphics2D) g;

    ______

    }
    }