Abhilash's Mock Exam Question 57.
The no-argument constructor provided by the compiler when no constructor is explicitly provided in the code
1, is always public
2, is always "friendly"
3, always defaults to the access modifier provided for the class.
4, depends on the compilation options of javac
answer is #3.
I think #1 is right. pls look my following code:
package a;
public class one{
}
package b;
import a.*;
public class two{
public static void main(
String ags[]){
one o = new one();
System.out.print("done");
}
}
the code above working fine without error.
thanks,
tom gong