![]() |
|
![]() |
|
|
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: Wet west coast of Canada
Posts: 1,126
Rep Power: 5
![]() |
Quote:
Quote:
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
||
|
|
|
![]() |
| 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 7:49 AM |
| Designing business rules for a beautifier. | nnxion | Other Programming Languages | 1 | Feb 22nd, 2006 10:05 AM |
| Forum Rules | big_k105 | Community Announcements and Feedback | 38 | Sep 12th, 2005 8:05 PM |
| Firewall Script using IPTABLES | Ravilj | Bash / Shell Scripting | 3 | Mar 9th, 2005 10:09 PM |