Packages and class by the same name.
Author |
Message |
Aziz

|
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? |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
wtd
|
Posted: Sat Aug 05, 2006 9:17 am Post subject: (No subject) |
|
|
Simply use the qualified name. |
|
|
|
|
 |
Aziz

|
Posted: Sat Aug 05, 2006 9:18 am Post subject: (No subject) |
|
|
You mean rpg.character.Character? |
|
|
|
|
 |
|
|