To specifically answer your question.
Java packaging is pretty simple. The only way to get a namespace collision is to have two classes in the same package with the same name.
package com.game.battles
public class Battle10{
}
package com.game.battles.behavior
public class Battle10{
}
package com.game.battles
public class Battle101 extends com.game.battles.Battle10{
public static class Battle10{
}
}
the battle 10 within the battle 101 has the namespace:
com.game.battles.Battle101.Battle10
the battle10 outside
com.game.battles.Battle10
if you refer to both classes in the same block of code, declaring the fully qualified path will let you grab the correct one regardless of name.
com.game.battles.Battle10 battle10 = new com.game.battles.Battle10()
com.games.battle.Battle101.Battle10 innerBattle = new com.games.battles.Battle101.Battle10()
In our example we have 3 battle10 classes. one of which is inner, two of which in different packages.
None of these have namespace collisions... but need to be fully qualified on use.
I recommend maybe restructuring your code to avoid this namespace mess.
as a side note: this is cumbersome, but possible. It is highly discouraged to make your code look like this.