• 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/37

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;

37 Cards in this Set

  • Front
  • Back
Object
An instance of a class, Each ___ has 2 characteristics: state and behavior.
___ is a runtime entity and its state is stored in fields and behavior is shown via methods.
Instance
Run time representation (of the class)
Reference
Name of object
State
[Field] Properties of the object
Behavior
[Methods] Certain set of actions that object can perform
Member
___ is a content of the body of a class and used to define variables and methods
Field
Member variables in a class. Variables that hold data, specific to each object.
Primitive or reference type
Method
Collection of statements that are grouped together to perform an operation.
AKA: Procedure, Function, Behavior, Subroutines
Constructors
A special method runs automatically and generates a new object
Parameters
Variables in method declarations
What is Abstract class
Class that can not be instantiated. Its only purpose is for other classes to extend.
What is Encapsulation
______ is a technique used for hiding the properties and behaviors of an object and allowing outside access only as appropriate. It prevents other objects from directly altering or accessing the properties or methods of the object.
What is Polymorphism?
______ is briefly described as "one interface - many implementations". It's an ability of an object to take on many forms - specifically to allow an entity such as variable, function or an object to have more than one form. The most common use of ___ in OOP occurs when a parent class reference is used to refer to a child class object.
How does Java implement polymorphism?
Inheritance, Overriding and Overloading are used to achieve Polymorphism. P. manifests itself in Java in the form of multiple methods having the same name.
- In some cases, multiple methods have the same name, but different formal argument list (overloaded method)
- In some cases, multiple methods have the same name, same return type and same formal arguments list (overridden methods)
What is inheritance
Is a process when objects from one class acquire the properties of another class. A class that inherited called superclass, the class that does the inheriting called subclass. I. is done by using keyword "extends"
What is abstraction?
It's a concept of exposing only the required essential characteristics and behavior with respect to a concept
Accessor
An ______ is a method is used to ask an object about itself.
Variables
Reserved memory locations to store values. In Java all ___ must be declared before they can be used
Static (Class) variables
Are declared with the static keyword in a class but outside a method, constructor or a block. Usually declared as constants (public/private, static and final), with or without initialization.
Local variables
____ are declared in methods, constructors or block.
____ are created when method, constructor or block is entered and the variable will be destroyed once it exits the method, constructor or block
Instance variables
_____ are declared in a class but outside a method, constructor or block.
Access modifiers (private) can be given for ___.
Data Type
Set of data with values having predefined characteristics, determines the possible values (integer, floating point, boolean, char, string) and operations can be performed
byte
8-bit signed integer
Values -128 - 127 (holds 3 digits)
Default = 0
short
16-bit signed integer
Values -32,768 - 32,767 (holds 5 digits)
Default = 0
int
32-bit signed integer
Values -2,147,483,648 to 2,147,483,647 Default value = 0
Holds 10 digits
long
64-bit signed integer.
Value is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
Default value is 0
Holds 19 digits
float
Single-precision 32-bit floating point.
Values: - 1.40129846432481707e-45 to 3.40282346638528860e+38
Default value is 0.0F
Holds 7 decimal digits
double
Double-precision 64-bit floating point.
Values: -4.94065645841246544e-324d to 1.79769313486231570e+308d
Default value is 0.0F
Holds 15 decimal digits
boolean
1 bit of information
Values: true or false
Default = false
char
Single 16-bit Unicode character
Values: ‘\u0000’ - ‘\uFFFF’
Default = ‘\u0000’
Autoboxing
Automatic conversion from the primitive data types to their corresponding object wrapper classes. Made by compiler
Unboxing
Conversion from wrapper class to primitive data type
Expression
An ____ is a construct made up of variables, operators and method invocations.
Constructed according to the syntax of a the language and evaluates to a single value
What is an Exception in Java?
An exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions.
What is Checked exception?
Exception that is typically a user error or a problem that cannot be foreseen by the programmer. For example, if a file is to be opened, but the file cannot be found, an exception occurs. These exceptions cannot simply be ignored at the time of compilation.
What is Runtime exception?
An exception that occurs that probably could have been avoided by the programmer. As opposed to checked exceptions, runtime exceptions are ignored at the time of compilation.
What is Errors?
These are not exceptions at all, but problems that arise beyond the control of the user or the programmer. Errors are typically ignored in your code because you can rarely do anything about an error. For example, if a stack overflow occurs, an error will arise. They are also ignored at the time of compilation.