The following code contains one compilation error, find it?
public class Test { Test() { } // line 1 static void Test() { this(); } // line 2 public static void main(String[] args) { // line 3 Test(); // line 4 } }
A.At line 1, constructor Tester must be marked public like its class
B.At line 2, constructor call
C.At line 3, compilation error, ambiguity problem, compiler can't determine whether a constructor
D.At line 4
Answers
Answered by
2
______✨ HEY MATE ✨______
➡️Option (c) is the right answer ✔️
✌✌Hope it's help u ✌✌
➡️Option (c) is the right answer ✔️
✌✌Hope it's help u ✌✌
Answered by
23
Hope this is ur answer
Option (c)
Hope it helps u.
Option (c)
Hope it helps u.
Similar questions
Social Sciences,
7 months ago
English,
7 months ago
English,
7 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
Math,
1 year ago
Political Science,
1 year ago