When I write a class Widget.java
Widget.java
public class Widget { int data; String name; }
will the compiler-generated constructo
It depends on your class visibility.The compiler uses the class visibility and generates a no-arg default constructor with the same visibility