PRO192_-_SP_2024_-_Block_5_-_FE_1921.webp
K

PRO192_-_SP_2024_-_Block_5_-_FE_1921.webp

Multiple Choices
(Choose 1 answer)
Read the following Java program:
class Person
{
String name;}
class Student extends Person
{
double marks;
public Student(double marks, String name) {
}
[ Blank A]
this.marks = marks;
}
public String toString()
{ } return name + " - " + marks;
public class Main {
public static void main(String[] args) { Student s = new Student(7.5, "John Vu");System.out.println(s);}
}
The program output looks like as below:
John Vu -7.5.
Which of the followings is correct for blank A.

A. this.name = name;
D cupor/name).

Thông tin

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

Share this media

Back
Bên trên Bottom