In java the domain namespace is the paquetage.
"name of a class" is : name of a paquage + an identifier.
In short, the identifier of the class is the name of the class, but it's a human convention. The name of the class is always paquage+identifier.
For anonyme class, java provide an identifier.
doing :
a.b.c.Foo foo = new a.b.c.Foo();
is equivalent to
import a.b.c.Foo;
...
Foo foo = new Foo();
How to name paquage / domain space ? With your name of your domain :-), somtimes with "ing" as suffix (java.util.logging).
You can also simulate some domain namespaces with the nested class (inner static class).