DEV Community

Discussion on: No, File Name and Class Name do NOT need to be same in Java. Here’s How.

Collapse
wldomiciano profile image
Wellington Domiciano

It is important to note that the class name and file name must be the same when the class is public.

Collapse
ashutoshdubey133 profile image
Ashutosh Dubey Author

True. Thanks for the remainder, will edit my post. 👍