• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/36

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

36 Cards in this Set

  • Front
  • Back
In Java, every value has a (1)
(1) Type
You use (1) to store values that you want to use at a later time
(1) Variables
Identifiers for variables, methods, and classes are composed of (1), (2) and (3) letters.
(1) Letters
(2) Digits
(3) Underscore
By convention, variable names should start with a (1) letter
(1) Lowercase
Use the (1) operator (=) to change the value of a variable
(1) Assignment
All (1) must be initialized before you use them
(1) Variables
Syntax 2.1 VARIABLE DEFINITION

typeName Variable Name = value;
or
typeName variableName

Purpose: To define a new variable of a particular (1) and optionally supply an initial (2)
(1) Type
(2) Value
Syntax 2.2 ASSIGNMENT

variableName = value;

Purpose: To assign a new (1) to a previously defined variable
(1) Value
(1) are entities in your program that you can manipulate by calling methods
(1) Objects
A method is a sequence of instructions that accesses the (1) of an (2)
(1) Data
(2) Object
A class defines the (1) that you can apply to (2)
(1) Methods
(2) Objects
The public interface of a class specifies what you can do with its (1). The (2) implementation describes how these actions are carried out.
(1) Objects
(2) Hidden
A parameter is an input to a (1)
(1) Method
The implicit parameter of a method call is the (1) on which the (2) is invoked
(1) Object
(2) Method
The (1) value of a method is a result that the method has computed for use by the (2) that called it
(1) Return
(2) Code
A method name is overlooked if a (1) has more than one (2) with the same name (but different parameter (3))
(1) Class
(2) Method
(3) Types
A (1) type denotes floating-point numbers that can have fractional parts
(1) double
In Java, numbers are not (1) and number types are not (2).
(1) Objects
(2) Classes
Numbers can be combined by arithmetic (1)
Operations
To construct new objects, use the new (1) followed by a (2) name and (3)
(1) Operator
(2) Class
(3) Parameters
Syntax 2.3 OBJECT CONSTRUCTION

new ClassName (parameters)

Purpose: To construct a new object, initialize it with the (1) parameters, and return a (2) to the constructed object
(1) Construction
(2) Reference
An (1) method does not change the state of its implicit parameters. A (2) method changes its state
(1) Accessor
(2) Mutator
Implementing a test Program (Place in Correct Order)
1. Display the results of the method calls
2. Inside the main method, construct one or more objects
3. Provide a tester class
4. Display the values that you expect to get
5. Supply a main method
6. Apply methods to the objects
1. Provide a tester class
2. Supply a main method
3. Inside the main method, construct one or more objects
4. Apply methods to the objects
5. Display the results of the method calls
6. Display the values that you expect to get
Syntax 2.4 IMPORTING A CLASS FROM A PACKAGE

import packageName.ClassName;

Purpose: To import a (1) form a package for use in a program
(1) Class
The API (1'') documentation lists the (1) and the (2) of the Java library
(1'') Application Programming interface
(1) Classes
(2) Methods
An object (1) describes the location of an object
(1) Reference
(1) variables store numbers. (2) variables store references
(1) Number
(2) Object
To show a frame, construct a (1) object, set it's size, and make it (2)
(1) JFrame
(2) Visible
In order to display a drawing in a frame define a (1) that extends the (2) class
(1) Class
(2) Jcomponent
Place drawing instructions inside the (1) method. That method is called whenever the component needs to be repainted
(1) paintComponent
The (1) class let you manipulate the graphics (2) -- such as the current color
(1) Graphics
(2) State
The Graphics2D class has (1) to draw (2) objects
(1) Methods
(2) Objects
Use a (1) to recover the Graphics2D (2) from the Graphics parameter of the (3) method
(1) Cast
(2) Object
(3) paintComponent
(1) and (2) are classes that describe graphical shapes
(1) Ellipse2D.Double
(2) Line2D.Double
The (1) method draws a string, starting at it's base point
(1) drawString
When you set a color in the (1) context, it is used for subsequent drawing operations
(1) Graphics