Computer Science, asked by snehakashyap3516, 1 year ago

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 Neeraj723
2
______✨ HEY MATE ✨______

➡️Option (c) is the right answer ✔️


✌✌Hope it's help u ✌✌
Answered by Anonymous
23
Hope this is ur answer

Option (c)

Hope it helps u.
Similar questions