Packages and class by the same name.
Author |
Message |
Aziz
![](http://compsci.ca/v3/uploads/user_avatars/17740604804829f8242e90c.png)
|
Posted: Sat Aug 05, 2006 9:06 am Post subject: Packages and class by the same name. |
|
|
Say I write a Character class, and put it in a package rpg.character; Now, that class won't get confused with java.lang.Character unless another file imports both. But java.lang is by default imported, right? So if I want to use Character outside its package, would would I do? Rename the class? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
wtd
|
Posted: Sat Aug 05, 2006 9:17 am Post subject: (No subject) |
|
|
Simply use the qualified name. |
|
|
|
|
![](images/spacer.gif) |
Aziz
![](http://compsci.ca/v3/uploads/user_avatars/17740604804829f8242e90c.png)
|
Posted: Sat Aug 05, 2006 9:18 am Post subject: (No subject) |
|
|
You mean rpg.character.Character? |
|
|
|
|
![](images/spacer.gif) |
|
|