Programming - 2 - Classes and Objects Flashcards

1
Q

Description of Java - OO

A

In OO, code and ata are couple into object classes, with object instances creatin data copies. Most languages are compiled to the assembly language of the underlying processor. JAVA is compiled to an intermediate representation known as bytecode (platform neutral, language of Java Virtual Machine). JVM is compiled for a specific device and can then run any Java code → platform independence. The approach results in relative inefficiency, unsuitable for real-time embedded progams.

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

Definition of Classes:

A

Collection of (public) methods and (private) data

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

Definition of Methods:

A

Operations that code of other classes can perform to an object instance. Classes are also define data or instance variables that all methods have access to.

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

Definition of Constructor:

A

method with class’s name, initialises instnace variables (called whn new object is created)

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

Definition of Static Methods :

A

can be called without an object instance

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

Definition of Method Overloading:

A

class includes methods with same name but different parameters

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

Definition of Primitives:

A

boolean, char, int, float, double.

Wrapper classes: Boolean, Character, Integer, Float

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