PRO192_-_SU_2023_-_Block_5_-_FE_735.webp
successful_man

PRO192_-_SU_2023_-_Block_5_-_FE_735.webp

(34)
(Choose 1 answer)
A. S01 An 5
B. S01 An
C. Exception is thrown at runtime
D. Compilation fails
}
}
Given the following. What is the result?
public class Example {
public static void main(String[] args) {
Student S = new Student("S01", "An", 5);System.out.println(S);
}
class Person {
String code, name;
public Person(String code, String name) {
this.code = code;
this.name = name;
}
@Override
public String toString() {
return code + "\t" + name;
}
class Student extends Person {
int mark;
public Student(String code, String name, int mark) { super(code, name);
this.mark = mark;
}

Thông tin

Category
PRO192
Thêm bởi
successful_man
Ngày thêm
Lượt xem
1,989
Lượt bình luận
12
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_SU_2023_-_Block_5_-_FE_735.webp
File size
58.7 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom