/*
Constructor =>
what? Method
why? to reset instance variable
"reset" means renew iv
rule?
- Constructor's Name should be equals to Class's
- NO return values without 'void'
- All class has more than one constructor
-
Defualt Constructor
- constructor without parameter. But in the case
of class has no constructor,Compiler Automatically
add constructor to class
*/
class Data_1 {
int value;
}
class Data_2 {
int value;
Data_2(int x){
value = x ;
}
}
public class Ex6_11 {
public static void main(String[] args){
Data_1 d1 = new Data_1();
Data_2 d2 = new Data_2(34);
}
}