public class Bug {
private int n;
public Bug(int n) { this.n = n; }
}
// ...
Bug b = new Bug();What is the result?
- Acheck_circle
Compile-time error: no matching constructor
- B
0
- C
Run-time error
- D
null
Explanation
Once an explicit constructor is declared, the no-argument default constructor is not generated.