You can organize Java projects in two different ways.
The default organization for new projects can be changed on the preference pages (Window > Preferences > Java > Build Path).
Creating a Java project as its own source container
Creating a Java project with source folders
Creating a new Java class
Creating a new Java interface
Creating a new source folder
Creating Java elements
Working with build paths