If you compare two Strings in a case insensitive way, e.g. with String.compareToIgnoreCase, then they are considered equal if they differ only in capitalisation.
Java, the language, is case-sensitive . Capitalisation must be precise in class, method and variable names. avar is not the same variable as aVar. However, the underlying operating system may be case-insensitive, e.g. Windows. To Java, MyApp. class and Myapp. class are totally different files, but to Windows they are the same. To avoid problems, never name two different classes (or any other entities for that matter) with names differing only in capitalisation. The one possible exception is to name a local variable the same as its class, with the leading cap change to lower case, e.g. MyApplet myApplet = new MyApplet(); The OS (Operating System) never sees these local variable names.
Resources, resource bundles, jar members generally and images all need the correct capitalisation. Again for safety, file names should be correct too, though Windows permits sloppiness.
This page is posted |
http://mindprod.com/jgloss/casesensitive.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\casesensitive.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[18.97.14.84] |
| |
Feedback |
You are visitor number | |