Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7938129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:43:05+00:00 2026-06-03T22:43:05+00:00

I am new at Android development and also Java. I am working on a

  • 0

I am new at Android development and also Java. I am working on a project, which is of medium size.
I am wondering how one can organize the code best. Right now I have too many classes, so I use the file find too much to find things.
I have read that it is not possible to store e.g. icons under specific sub folders. I did not find a way to do this with classes either. Is it not possible to add a folder and then maybe extend the namespace to my.project.com.foldername?
I have lots of classes, which I would like to group. E.g. I would lige to group classes of type database, layout etc together in folders. If I create a new package I can not access the public classes easily. Or am I missing something.

And is there something like sections or regions, to group the code within a class? I would like to collapse the code and expand to see regions, or how it may be called in Java. Similar to the description of a method. But I would like to put e.g. 5 public method in a region public. So I will quickly find it, if I know that they are public for instance.

Please remember, I am new to Java and Android. So I may miss an obvios point.

Best Regards,

Patrick

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:43:06+00:00Added an answer on June 3, 2026 at 10:43 pm

    The correct way will be to use packages. Group your classes like this:

    com.myservername.myapp.database 
    com.myservername.myapp.layout
    

    For each package you create a new folder. Eclipse will do that automatically for you. To use a public method from a class from a different package, you need to import it:

    import com.myservername.myapp.database.MyClass;
    

    Again Eclipse is your friend. Type Ctrl+Shift+O (Right Click, Source, Organize imports) to add the declaration automatically.

    Eclipse’s editor doesn’t support collapsing just the public or private methods. But you could use the Outline to navigate between methods. Public methods are denoted with green circles, private with red squares. Keep your classes small and you shouldn’t have a problem navigating through the code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am also new to Java and Android Development, been making a simple game
I'm fairly new to Android development and am working on an app which allows
I am new to android development and my code is not working how it
I'm new to java and android development. After spending few days working with java
I'm fairly new to Android development and I can't seem to grasp the Java
I'm new to Android development, and I was wondering if anyone knew either how
I am new to android development. I am creating an android application, in which
I am semi-new to android development. I am getting ready to design a project
I'm new to Android development and working on an Android application that requires the
I'm moving a project to the new Android Native Development Kit (i.e. JNI) and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.