Homejava programming What will happen, when the main of class is not defined in the class of a program in java? heera babu -January 01, 2016 0 Program:// define class without mainclass Withoutmain{ // static is predefined keyword static { //calling printf function System.out.println("hello static block"); }}Sample Output: Tags: java programming Facebook Twitter