Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Code regions

843785Mar 13 2009 — edited Mar 13 2009
Hi guys,

I'm looking for some way to make my Java code look a bit tidier. I'd like to arrange it into what I'd call regions (as in Visual Studio/.NET), so I could have something like:

#region getMethods
public int getOne() { .. }
public int getTwo() { .. }
public int getThree() { .. }
#endregion getMethods

#region mathsMethods
public int add(int x, int y) { .. }
public int sub(int x, int y) { .. }
public int multi(int x, int y) { .. }
public int div(int x, int y) { .. }
#endregion mathsMethods

..and then I can say, minimise a particular region when I'm browsing through my code.

Can you tell me if there's any equivalent in Java? I'm using Eclipse if that helps.

Many thanks,
Ian
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2009
Added on Mar 13 2009
3 comments
252 views