A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
why .java filename constraint ?
prashant p joshi
Joined: Jul 22, 2002
Jul 22, 2002 00:43:00
why .java filename must be same as public class name defined in that file?
Sayed Ibrahim Hashimi
Joined: May 17, 2001
Jul 22, 2002 04:25:00
I think its because that is how the compiler finds the class files. By package and class name.
SCJP 1.4<br /><a href="http://www.cise.ufl.edu/~sih" target="_blank" rel="nofollow">www.cise.ufl.edu/~sih</a>
Joined: Jan 07, 1999
Jul 22, 2002 05:31:00
It's just a convenience for the compiler.
It's one of the tricks which enable recompiling a whole
project to be acceptably quick, without needing something like a "makefile" to tell it what to compile.
Read about me at frankcarver.me
Raspberry Alpha Omega
Frank's Punchbarrel Blog
Have you checked out
subject: why .java filename constraint ?
download link in jsp ?
Slashes being removed when getting URL streams
Empty java file
How to avoid hardcodings while testing
role of interpreter and jti
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015