Import <package name>
Class <class name>
{
Public static void main( string array[ ] )
{
Instance var;
Instance var;
Return type method name()
{
--------------------------------------------
------------------------------------
--------------
}
}
}
Import :- import reserve word of java program use to include or load the
package.
Package name:- package is a combination of class when it required to
perform different input output work and another work use package .
Class:- class is a combination of instance variable and member method java
program must initiate with class name.
class name is user when define name.
Static:- when it required to access a method without creating its object we use static
reserve word .
Public:-public is a access specifier when a class member is produceded
by public than its member can be access by code out side in its class .
Void main:-void main is a return type and main is the class of java
.when class main is declared by void it means is doesn’t returen only
value .
String array:-java created everything as a string so it store value
declared an array array[ ] whose type is string
w3codeblog

Java program structure

  • 3.
    Import <package name> Class<class name> { Public static void main( string array[ ] ) { Instance var; Instance var; Return type method name() { -------------------------------------------- ------------------------------------ -------------- } } }
  • 4.
    Import :- importreserve word of java program use to include or load the package. Package name:- package is a combination of class when it required to perform different input output work and another work use package .
  • 5.
    Class:- class isa combination of instance variable and member method java program must initiate with class name. class name is user when define name. Static:- when it required to access a method without creating its object we use static reserve word .
  • 6.
    Public:-public is aaccess specifier when a class member is produceded by public than its member can be access by code out side in its class . Void main:-void main is a return type and main is the class of java .when class main is declared by void it means is doesn’t returen only value . String array:-java created everything as a string so it store value declared an array array[ ] whose type is string
  • 7.