OOP Flashcards
1
Q
OOP
A
Object-Oriented Programming
2
Q
DRY
A
Dont repeat yourself
3
Q
Main Aspects
A
Classes and Objects
4
Q
Example Class
A
Fruit
5
Q
Example Objects
A
Appel Banaan Manderijn
6
Q
Example Class
A
Auto
7
Q
Example Objects
A
Audi Bmw Skoda
8
Q
Create a class named “Main” with a variable x:
A
public class Main {
int x = 5;
}
Moet beginnen met hoofdletter en java file moet overeenkomen met de class name
9
Q
Create an object called “myObj” and print the value of x:
A
public class Main {
int x = 5;
public static void main(String[] args) {
Main myObj = new Main();
System.out.println(myObj.x);
}
}