Given the following code, find the compile error.
public class Test{
public static void main...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 17.07.2020 05:01 ash3246
Given the following code, find the compile error.
public class Test{
public static void main(String[] args){
m(new GraduateStudent());
m(new Student());
m(new Person());
m(new Object());
}
public static void m(Person x){
System. out. println(x. toString());
}
}
class GraduateStudent extends Student {
public String toString(){ return "GraduateStudent";}
}
class Student extends Person{
public String toString(){ return "Student";}
}
class Person extends Object{
public String toString(){ return "Person";}
}
a. m(new Object()) causes an error
b. m(new Person()) causes an error
c. m(new Student()) causes an error
d. m(new GraduateStudent()) causes an error
![ansver](/tpl/images/cats/User.png)
Answers: 1
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 12:30
Animations and transitions are added from the
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 18:30
List 3 items that were on kens resume that should have been excluded
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 21:30
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest value. you may assume there is at least one value. (cascading/streaming logic, basic string processing)
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 03:30
Explain the importance of html in web page designing in 20 sentences..
Answers: 1
You know the right answer?
Questions
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
History, 08.04.2020 19:03
![question](/tpl/images/cats/mat.png)
Mathematics, 08.04.2020 19:03
![question](/tpl/images/cats/mat.png)
Mathematics, 08.04.2020 19:04
![question](/tpl/images/cats/mat.png)
Mathematics, 08.04.2020 19:04
![question](/tpl/images/cats/mat.png)
Mathematics, 08.04.2020 19:04
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 08.04.2020 19:04
![question](/tpl/images/cats/mat.png)
Mathematics, 08.04.2020 19:04
![question](/tpl/images/cats/biologiya.png)
Biology, 08.04.2020 19:04
![question](/tpl/images/cats/mir.png)
World Languages, 08.04.2020 19:04
![question](/tpl/images/cats/mat.png)
Mathematics, 08.04.2020 19:04
![question](/tpl/images/cats/mat.png)
Mathematics, 08.04.2020 19:04
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 08.04.2020 19:04
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 08.04.2020 19:04