![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 148
Rep Power: 4
![]() |
Naming Rules
I thought that the name of your class must be the same as the name of your project or file. I'm using JDeveloper and I just named a project "Gears of War." Then I named my class "GearsOfWarBaby", and I expected it to fail but it ran just fine. I don't get it.
|
|
|
|
|
|
#2 |
|
Expert Programmer
|
The code for a class must be in a file with the same name; eg, the code for the class GearsOfWarBaby must be in a file named GearsOfWarBaby.java. A project in an IDE such as JDeveloper may contain many such files.
|
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 148
Rep Power: 4
![]() |
Okay after expanding the nodes it looks like there is a file called GearsOfWarBaby that has a .java extension after it. That must be it then?
But it looks like I can name my program/project anything I want. I can even put a space between the words like Gears of War. |
|
|
|
|
|
#4 | ||
|
Caffeinated Neural Net
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 927
Rep Power: 4
![]() |
Quote:
Quote:
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp |
||
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New copyright rules. | Indigno | Coder's Corner Lounge | 0 | Nov 24th, 2006 6:49 AM |
| Designing business rules for a beautifier. | nnxion | Other Programming Languages | 1 | Feb 22nd, 2006 9:05 AM |
| Forum Rules | big_k105 | Community Announcements and Feedback | 38 | Sep 12th, 2005 7:05 PM |
| Firewall Script using IPTABLES | Ravilj | Bash / Shell Scripting | 3 | Mar 9th, 2005 9:09 PM |