 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Alex Dyer Guest
|
Posted: Fri Jul 04, 2003 6:19 am Post subject: One difference between JB7 and JB9 ? |
|
|
For JB9, the name of class name should be the exactly same as the
filename of .java, even "hello" differ with "Hello.java".
But for JB7, the combination of "hello" with "Hello.java" is fine!
|
|
| Back to top |
|
 |
Sultanbek Tezadov Guest
|
Posted: Fri Jul 04, 2003 7:29 am Post subject: Re: One difference between JB7 and JB9 ? |
|
|
JB9's behaviour is correct in this respect. Exact match is required by
JLS. But note that this requirement is applied to public classes only,
but "package access" class names may differ. For example:
// File Hello.java
public class Hello {} // Produces Hello.class
// File Hello.java
public class hello {} // Compiler error
// File Hello.java
class Hello {} // Produces Hello.class
// File Hello.java
class hello {} // Produces hello.class
--Sultan
On Fri, 04 Jul 2003 14:19:11 +0800, Alex Dyer <dotnetinhand (AT) hotmail (DOT) com>
wrote:
| Quote: | For JB9, the name of class name should be the exactly same as the
filename of .java, even "hello" differ with "Hello.java". But for JB7,
the combination of "hello" with "Hello.java" is fine!
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|