
What is architecture of java

Architecture of Java program
Here is an architecture of a java program where documentation part or writing comments into program is completely optional.Declaration of package is neccessary if you want to keep the class in some package.Import statements are needed if want to import the class from other package.
Whereas class definition & program body is compulsory which will have your actual code.
__
Documentation |
|
Package Declaration |--Optional
|
Import Statements __|
__
Class Definition |
|--Mandatory
Program Body __|