KRB
KRB

Reputation: 5185

Can I organize classes into folders after making them and they will still work?

For Example, i just have a bunch of classes sitting out there for my game. Some are drawable, nondrawable, animated sprites, and more.

I just want to know if I right-click my package and add a folder.. drop some classes into it, will it disable my program? I know in XNA it worked like that because you had to give the path. I am unsure in android.

Thanks guys and GALS

*Edit (included GALS)

Upvotes: 4

Views: 2765

Answers (1)

Tony the Pony
Tony the Pony

Reputation: 41447

No, adding folders and new classes will not affect your program (unless you're doing some processing that depends on your class hierarchy structure staying constant, which is not very common). However, if you move existing classes to different folders, you will also need to change the package statement in each source code file that you moved, as well as all references to these classes.

If you want to reorganize your class files, the refactoring capabilities in Eclipse will help you with this; you can move a class using the refactoring tools, and Eclipse will update all references automatically.

Upvotes: 7

Related Questions