Java Flashcards
(201 cards)
What is an identifier?
A letter followed by any number of letters and numbers, case sensitive, that are used to identify classes, variables, methods, etc.
What is a name?
A series of identifiers separated by a dot (.) such as, “System.out”.
Java bytecode
A Java compiler translates Java source code into Java bytecode to be used by the Java interpreter to execute it on a specific machine. (Unlike machine code, Java bytecode is not tied to a particular processor.)
Problem Solving Steps
- Understand the problem.
- Design a solution.
- Consider alternatives to the solution and refine the solution.
- Implement the solution.
- Test the solution and fix any problems that exist.
Software Development Activities
- Establish the requirements.
- Creating a design.
- Implementing the design.
- Testing.
object
A fundmental element in a program. Every object has:
- A state or state of being - as in the fundamental characteristics that currently define the object.
- A set of behaviors - The activities associated with the object.
attributes
The values the object stores internally, which may represent primitive data or other objects. Collectively, the values of an object’s attributes define its current state.
method
A group of programing statements that have been given a name.
class
An object is defined by a class
encapsulation
An object that protects and manages its own information. An object that is self-governing.
inheritance
The definition of one class that is based on another class that already exists.
Common characteristics are defined in high-level classes, and specific differences are defined in derived classes.
Polymorphism
We can refer to multiple types of related objects over time in consistent ways
System.out.print(“ “);
Prints the information between the parentheses to the screen and does not advance to the next line.
System.out.println(“ “);
Prints the information between the parentheses to the screen and advance to the next line.
string concatenation
The use of an operator to append one string to the end of another, such as:
“The only stupid question is “ + “the one that’s not asked.”
Escape Sequences
\b
backspace
Escape Sequences
\t
tab
Escape Sequences
\n
newline
Escape Sequences
\r
carriage return
Escape Sequences
"
double quote
Escape Sequences
'
single quote
Escape Sequences
\
backslash
variable
A name for a location in memory used to hold a data value.
Local Variable Declaration
Consists of a Type followed by a list of variable names.
If the final modifier preceeds the declaration, the identifiers are declared as named constants whose values cannot be changed once they are set.