Kizspy | Question: 18 (Choose 1 answer)
What is the output of the following code snippet?
public class Person {
String id = "P1";public Person(String id) {
this.id = id;
}
public String getId() {
return id;
}
public void setld(String id) { this.id = id;}
public static void main(String[] args) { Person p = new Person();p.setId("FPTU");System.out.println(p.getId());}
FUOVE
}
A. Compile error
B. null
C. P1
D. FPTU