Q19.webp
Đ

Q19.webp

Kizspy | Question: 19
(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 setId(String id) {
this.id = id;
public static void main(String[] args) {
Person p = new Person();
p.setld("FPTU");
System.out.println(p.getId());
}
A. Compile error
B. null
C. P1
D. FPTU

Thông tin

Category
PRO192
Thêm bởi
Đức Thành1
Ngày thêm
Lượt xem
1,697
Lượt bình luận
8
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom