Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Whats this ?

 
Gurpreet Saini
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,
I am working on the following -version :

C:\sun>java -version
java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)

---------------------------------------------------------------------------
Now when I compile my file called DateFunction.java. As
javac DateFunction.java
It compiles succesfully. But by mistake I typed dateFunction.java and to my surprise it compiled. Other than DateFunction.java file there is no other file in my classpath named dateFunction.java but still it is compiling. I dont understand . Even also if I type datefunction.java then also does compile.
please help
thank you,
[ EJFH: Removed a few dozen question marks in subject ]
[ May 03, 2004: Message edited by: Ernest Friedman-Hill ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gurpreet,
Windows isn't case sensitive. Compiling occurs within the OS, so Windows picks up the file. If you try to reference the same file from within another Java class, the case will matter.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java in General (Beginner.) Followups there, please.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did javac generate a datefunction.class or a DateFunction.class?
In the second case, it will not matter. (but avoid it in ant-build-files).
 
Nick George
Ranch Hand
Posts: 815
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wonder what it looked like with the quotation marks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic