Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I give different name to class than the file name?

Tags:

java

When i want to create a java class it is generating automatically a file with the same name of class.

But when it generate a class, it can change the file name different than class name.. Am i missing something?

alt text
(source: screencast.com)

alt text

like image 284
uzay95 Avatar asked Dec 24 '09 14:12

uzay95


1 Answers

Because the language designers say so. It really is that simple. It's a convention and they force you to follow it.

like image 169
Glen Avatar answered Sep 21 '22 08:09

Glen