Java 1 Flashcards

(163 cards)

1
Q

Object orientation

A

An approach that supports the creation, enhancement and maintenance of complex IT systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Method

A

An element of objects that is used to create, read, change and perform calculations on the values of attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Class

A

A structure that is used to create digital objects which are the central elements in the OO software development process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Analysis model

A

The result of the OO analysis, which is used for communication between developers and client and/or users of system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Complier

A

A software that translates a program code into a form that can be executed by a computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Bytecode

A

The form of Java program after its compilation that can be executed with JRE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Default value

A

A value that is assigned to an attribute automatically when the object is created

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Principle of data encapsulation

A

An object can never directly access attributes of another object or changing them. It is possible only by getters and setters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Method signature

A

Method name + parameters list. RETURN TYPE IS NOT A PART OF METHOD SIGNATURE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Method overloading

A

This process is sued too implement multiple methods with same name and different parameters list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Syntax error

A

Error in code construction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Runtime error

A

Error that causes a program to terminate abnormally

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Logic error

A

Error that occurs when a program does not perform the way it was intended to

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Pseudocode

A

Natural language mixed with some programming code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Variable

A

Value which is stored in computer memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Data type

A

The kind of data that is stored in a variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Specific import

A

Import that specifies a single class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Wildcard import

A

Import all classes from a package

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Scope of variable

A

Is the part of the program where the variable can be referenced

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Named constant

A

Is an identifier that represents a permanent value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Literal

A

Is a constant value that appears directly in a program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Casting

A

Is an operation that converts a value of one data type into a value of another data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Software development lifecycle

A

Is a multistage process that includes requirements specification, analysis, design, implementing, testing, deployment, maintenance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Round off error

A

The difference between the calculated approximation of a number and its exact mathematical value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Primitive data type
Data type where values are not objects (logical values, integers, floating point numbers, single characters)
26
Arithmetic operator
Operator for executing mathematical functions, such as addition, subtraction, division, multiplication.
27
Logical operator
Operator used to run logical functions, such as negation, logical AND, logical OR, logical XOR
28
Relational operator
Operator used to compare expression against each other
29
Equality test operator
A relational operator used to run functions that test for equality or non-equality in which operands determine whether values or references are compared
30
String concatenation
A function of data type String which creates a new string from 2 existing strings
31
Control structures
Elements of programming language for conditional or nested execution of statements
32
Package
An element used for structuring Java classes of a development project
33
Boolean expression
Is an expression that evaluates to a Boolean value
34
If statement
Is a construct that enables a program to specify alternative paths of execution
35
Flowchart
A diagram that describes an algorithm or process, showing steps as boxes of various kinds and their order by connecting these boxes with arrows
36
Nested if statement
The inner if statement in the another if statement
37
Fail-through behaviour
Once a case in switch statement is matched, the statements from the matched case are executed until the break statement or the end of the switch statement is reached
38
Conditional operator
(a ternary operator) operator that evaluates an expression based on a condition
39
Conditional branch
A control structure that is used to execute statements based on multiple, mutually exclusive conditions
40
Loop
A control structure used for executing statements repeatedly
41
Debugging
Process of finding and fixing logical errors in a program
42
Escape character
Special notation that consists of a backslash followed by a character or combination of digits
43
String
Sequence of characters
44
IS-A relationship
The relationship that expresses the fact that a class is a special type of another class
45
Superclass
The class from which other classes are derived
46
Subclass
The class that specifies a superclass by implementing an improved functionality with additional methods and attributes
47
Inheritance
Type of relationship that enables the abstraction of common attributes in a superclass, therefore reducing repetition in design
48
Assignment compatibility
A variable of the type of a superclass can also be assigned to subclass objects
49
Extension
A concept that used by Java to implement inheritance
50
Overriding
The process of implementing an inherited method
51
Loop continuation condition
A boolean expression that controls the execution of a loop body
52
Counter-controlled loop
A loop that uses the control variable to count the number of iterations
53
Sentinel value
The special input value that signifies the end of the input
54
Sentinel-controlled loop
A loop that uses a sentinel value to control its execution
55
Control variable
A variable that is used in a loop to control how many times the loop body is executed and when the loop terminates
56
Pre-test loop
A loop where loop continuation condition is checked BEFORE the loop body is executed - while loop - for loop
57
Post-test loop
A loop where loop continuation condition is checked AFTER the loop body is executed - do while loop
58
Nested loop
A loop that consists of an outer loop and one or more inner loops
59
Method definition
Method name, parameters, return value type, body
60
Value returning method
A method that returns a value
61
Void method
A method that does not return a value
62
Method body
A collection of statements that implement the method
63
Method invocation
Calling a method
64
Pass-by-value
If the argument is a variable, than a literal value, is passed to the method as a parameter
65
Method overloading
Two methods have the same name but different parameter list within one class. Java determines which method is used by method signature
66
Ambiguous invocation
There are two or more possible matches for invocation of a method but compiler cannot determine the most specific match. Ambiguous invocation causes a compile time error
67
Local variable
A variable that is defined inside a method
68
Method abstraction
A separation the use of a method from its implementation. The client can use a method without knowing how it is implemented
69
Top-down approach
An implementation of one method in the structure chart at a time from top to down
70
Stub
A simple but incomplete version of a method that is used for the methods waiting to be implemented
71
Bottom-up approach
An implementation of one method in the structure chart at a time from down to top
72
Attribute
An element of objects that is used for saving concrete values
73
Array
A data structure which stores a fixed-size sequential collection of elements of the same type
74
Indexed variable
An index that is used to access elements of an array
75
Array initializer
A shorthand notation, which combines the declaration, creation and initialization of an array in one statement type[] arrayRefVar = {values...}
76
For-each loop
A for loop that allows to traverse an array or a list without using an index variable
77
Anonymous array
An array with no explicit reference variable
78
Precondition
A thing that is true before the method is invoked
79
Postcondition
A thing that is true after the method is returned
80
Strictly equal arrays
Arrays with same corresponding elements
81
Abstract class
A class which instances cannot be created; where common features are grouped together and an interface that must be supported by derived classes is defined
82
Abstract method
A method that has a signature but no method body; it defines the functionality that must be implemented in subclasses
83
Polymorphism
A declared variable of the type of a particular class can also accept instances of the subclass
84
Instanceof operator
An operator used to run a test of class membership
85
Class variable
An attribute that is same for all instances of a class and is accessed through the class name
86
New operator
An operator that creates a new object for a particular class
87
Standard constructor
A special method for creating objects of a class. Can only exist once per class
88
Empty standard constructor
If a constructor is not defined, the compiler explicitly adds an empty standard constructor
89
Garbage collection
Automatic memory management in Java
90
Overloaded standard constructor
A constructor used to initialize an object with values that are only determined at runtime, so this constructor defines a parameter list
91
Copy constructor
A constructor used for cloning objects
92
Deep copy
All reference data types are copied
93
Shallow copy
Only primitive data types and strings are copied
94
Ragged array
A 2D array where rows have different length
95
2D array
Array of 1D arrays
96
3D array
Array of 2D arrays
97
Multidimensional array
An array where each element is another array
98
State of the object
Data fields with their current values
99
Behavior of an object
Methods of an object
100
Class diagram
A special UML notation to display class template
101
Client of the class
The program that uses the class
102
Dot operator
An operator used to access data and methods via the object's reference variable
103
Instance variable
A data field that is dependent on a specific instance
104
Calling object
An object on which an instance method is invoked
105
Visibility modifier
An element that specifies how data fields and methods in a class can be accessed from outside the class
106
Public visibility
Visible: class, package, subclasses, global
107
Protected visibility
Visible: class, package, subclasses
108
Default visibility
Visible: class, package
109
Private visibility
Visible only inside the class
110
Accessor method
A method to return a value of a private data field
111
Mutator method
A method to set a new value for a private data field
112
Pass by sharing
The object referenced in the method is the same object as the one being passed
113
Immutable object
An object whose contents cannot be changed once the object has been created
114
Hidden variable
If a local variable has the same name as an instance variable, the local variable takes precedence
115
This (keyword)
A name of a reference that the object can use to refer to itself
116
Error signal
A code that specifies an exception with a value that is outside the valid value range (e.g. is negative)
117
Try-catch block
An structure in which critical program instructions are contained in the try block and exceptions are handled in the catch block
118
Throws (keyword)
A keyword that indicates in the method signature which exceptions can be thrown by the method
119
Finally block
The block that contains statements that are executed independent of the occurrence of an exception
120
Dynamic binding
The most suitable implementation will be selected by the runtime environment
121
Use association
The association that indicates that a class uses an interface
122
Class abstraction
A level of abstraction which separates a class implementation from how the class is used
123
Procedural programming paradigm
Action driven; data is separated from actions
124
Association
A general binary relationship that describes an activity between two classes
125
Multiplicity
A number or an interval that specifies how many of the class's objects are involved in the relationship
126
Aggregation
A special form of association that represents an ownership relationship between two objects
127
Composition
An existence of the aggregated object (subject) is dependent on the aggregating object (owner). Example: Name depends on Student
128
Stack
A data structure that holds data in LIFO fashion
129
Boxing
A conversion of a primitive value to a wrapper object
130
Unboxing
A conversion of a wrapper object into a primitive data value
131
Interned string
A unique instance for string literals with the same character sequence in order to improve efficiency and save memory
132
Regular expression
A string that describes a pattern for matching a set of strings
133
Synchronized
Only one task is allowed to execute the method
134
Capacity of the string builder
A number of characters, that string builder is able to store without having to increase its size
135
Subtype
A type defined by a subclass
136
Supertype
A type defined by a superclass
137
Multiple inheritance
The capability to derive a subclass from several classes
138
Single inheritance
A class may inherit directly only from one superclass
139
Constructor chaining
Constructing an instance of a class invokes the constructors of all superclasses along the inheritance chain
140
@Override annotation
An annotation which denotes that the annotated method is required to override a method in its superclass. If the method is not overriden the compiler reports an error
141
Declared type
A type that declares a variable
142
Actual type
An actual class for the object referenced by a variable
143
Implicit casting
Super obj = new Subclass()
144
Explicit casting
subclass obj = (subsclass) super
145
Upcasting
A casting of an instance of a subclass to a variable of a superclass
146
Downcasting
A casting of an instance of a superclass to a variable of a subclass
147
ClassCastException
An unchecked exception that is thrown if the superclass object is not instance of a subclass object.
148
Exception
An object that represent an error or a condition that prevents execution from proceeding normally
149
System error
An instance of the Error class, that represents an internal system error. Can't be recovered
150
Unchecked exception
A subsclass of a RuntimeException class, that describes programming errors
151
Checked exception
A subclass of Exception class, that represent an error outside the control of the program (IO error etc.)
152
Declaring exceptions
Every method should state types of checked exceptions it might throw
153
Exception handler
Code that handles an exception
154
Stack trace
A list of all methods in the call stack which provides valuable information for debugging runtime errors
155
Chained exception
Throwing an exception along with another exception
156
Try-with-resources
A construct that automatically closes resources. Resources should be an instance of AutoCloseable interface
157
Interface
A class-like construct for defining common operations for objects
158
Interface inheritance
A relationship between the class and the interface
159
Default method
A method in an interface that provides a default implementation for the method
160
Marker interface
An interface with an empty body
161
Principle of cohesion
A class should describe a single entity, and class operations should logically fit together to support a coherent purpose
162
Principle of clarity
A class should have a clear contract that is easy to explain and easy to understand
163
Principle of completeness
A class should provide a variety of ways for customization through properties, methods, constructors