Computer Science Canada Packages and class by the same name. |
Author: | Aziz [ 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? |
Author: | wtd [ Sat Aug 05, 2006 9:17 am ] |
Post subject: | |
Simply use the qualified name. |
Author: | Aziz [ Sat Aug 05, 2006 9:18 am ] |
Post subject: | |
You mean rpg.character.Character? |