In Java, Objects Within the Same Class Share Common ______?
- The “building blocks” that Java programmers use to write computer programs are called ______.
- A method is a sequence of ______that accesses the date of an object.
- In Java, objects within the same class share common ______?
- You can invoke the println and print methods on what objects?
- What is a storage location in the computer’s memory called that has a type, name, and contents?
- What term is used to describe the name of a variable, method, or class?
- What are the rules for valid identifiers?
- What is camel case?
- By convention among Java programmers, variables begin with a(n) ______.
- By convention among Java programmers, class names begin with a(n) ______.
- What would be a good choice for a variable identifier that will store a name?
- In Java, a(n) ______specifies the kind of values that can be stored in a variable.
- What is the name of the type that denotes floating-point numbers that can have fractional parts?
- What is the name of the type that denotes whole numbers?
- What is the name of the type that denotes a string of characters?
- Which type would be used to declare a variable that will store a welcome message?
- Which type would be used to declare a variable that will store a measurement with fractional parts?
- What type would be used to declare a variable that will store a whole number?
- In Java, a comment on a line begins with which characters?
- What term is used to refer to text in a program that is an explanation for human readers of the code?
- The Java compiler ignores any text between ______.
- What is the name of the = operator in Java?
- What is the purpose of the assignment operator?
- How do we write a statement that stores an integer value in a variable?
- How do we write a statement that declares and stores an integer value in a variable?
- How do we write a statement to change the value that is already stored in a variable?
- How do we write a statement to add 10 to the value already stored in a variable?
- What is an object?
- The type of an object is given by its ______?
- “System.out” is an object of which class?
- What is a method?
- What is a class?
- What are the methods of the String class?
- If greeting is a String object, what is an example of an incorrect method call on greeting?
- What is the term used to specify the collection of things you can do with objects that belong to a class?
- A method name is ______if a class has more than one method with that number (but different parameter types).
- The input to a method is called a(n) ______.
- What are the two types of methods?
- Input to a method, enclosed in the parentheses after the method name, is known as ______.
- How would a method call that represents the invocation of a method that does not have arguments appear?
- The value calculated by a method is called its ______value.
- Can a method have more than one method?
- How would a method class that uses the return value of a method as an argument appear?
- What is the declared return type for a method that does not have a return value?
- What is the syntax of a method declaration with a void return type?
- What methods do we know with a void return type?
- Which operator constructs object instances?
- Write a statement to construct a circle of radius 3.
- Write a statement that declares a variable that references a circle of radius 3.
- Write a statement that calls a constructor with no construction arguments.
- What terminology describes a method that returns information about an object and does not change the object’s internal data?
- What terminology describes a method of an object that modifies that object’s internal data?
- What are the mutator methods for the Rectangle class?
- What does API stand for?
- A(n) ______is a collection of classes with a related purpose.
- To use a class in another package you need to ______it.
- What package(s) are automatically imported in any Java program.
- Which classes are included in the java.lang package?
- Write a statement to allows us to use the Rectangle class.
- Which method could you use to obtain the string “1234567890” from the string “123-456-7890”?
- What is the purpose of a test program?
- Which term denotes the memory locations of an object?
- What do object variables store (in general)?
- Assuming the following Java statement: Circle c1 = new Circle(3);
What does the variable c1 store? - Assuming the following Java statement: intnum = 10;
What does the variable num store? - 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());? - 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());? - What is the output of the following code:
int num1 = 6;
int num2 = num1;
num2 = num2 + 10;
System.out.println(num1);? - What is the output of the following code:
int num1 = 6;
int num2 = 10;
num1 = num2;
num2 = num1;
System.out.println(num1 + “, “ + num2);? - 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);? - Complete the code fragment to ensure that the frame is shown:
JFrame frame = new JFrame();. - The setVisible method of the Jframe class returns what kind of argument?
- Write a code fragment that declares and constructs a new JFrame window and sets the width to 400 and the height to 200.
- Complete the code fragment to set the title of the frame to “An Empty Frame”
JFrame frame = new JFrame();. - What is the nickname for the graphical user interface library in Java?
- Drawing instructions should be placed inside the ______method, which is called whenever the component needs to be repainted.
- Complete the following statement, which constructs an ellipse.
Ellipse2D.Double ellipse = new ______(x, y, width, height);
- 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;
…
______
…
}
}