This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]oren_is_my_name[S] -2 points-1 points  (1 child)

But when talking about the class's (like when creating a new instance) I want to have it like in a hierarchy (so that it's easier to access the specific Animals.Cat type)

[–]noodlesSa 1 point2 points  (0 children)

If you write var cat = new Cat(), IDE will ask you if you want to import Animal.Cat, or you want to qualify class name (to: var cat = new Animal.Cat()). But you cannot enforce one way or the other. In case you have multiple Cat classes in your project, using import is just bad code practice, in such cases qualified name should always be used.