that they may be in stable initial state when first created constructors are invoked in unique waythey must be called using the new operator soupon invocationa new instance of this class is automatically created and its constructor is then called to initialize its instance variables and perform other setup tasks for exampleconsider the following constructor invocation (which is also declaration for the myfish variable)fish myfish new fish ( "wally") class can have many constructorsbut each must have different signaturethat iseach must be distinguished by the type and number of the parameters it takes the main method some java classes are meant to be used by other classesothers are meant to be stand-alone programs classes that define stand-alone programs must contain one other special kind of method for class--the main method when we wish to execute stand-alone java programwe reference the name of the class that defines this program by issuing the following command (in windowslinuxor unix shell)java aquarium in this casethe java run-time system looks for compiled version of the aquarium classand then invokes the special main method in that class this method must be declared as followspublic static voidmain(string[args)/main method body the arguments passed as the parameter args to the main method are the commandline arguments given when the program is called the args variable is an array of string objectsthat isa collection of indexed stringswith the first string being args[ ]the second being args[ ]and so on (we say more about arrays in section calling java program from the command line java programs can be called from the command line using the java commandfollowed by the name of the java class whose main method we wish to runplus