When I write a class Widget.java
public class Widget {
int data;
String name;
}
will the compiler-generated constructor be public or default?
public would be like
public class Widget {
int data;
String name;
public Widget() {}
}
whereas default similar to
public class Widget {
int data;
String name;
Widget() {}
}