3.5 Exercise :
variable p2 is not declared in this below code .
Code: Select all
public class Person {
int id;
String name;
java.util.Date dob;
boolean VIP;
public static void main(String[] args) {
Person p1 = new Person();
p2 = p1;
int id = p2.id;
p1.name = args[0];
}
public String getName() {
return name;
}
}