method inside the method??

can't we declare a method inside a method in java?? for eg: public class One { public static void main(String[] args)

{ One obj=new One(); One.add(); private static void add() {

  System.out.println("hiii..."); 
}

} }

not getting compiled y???

View Answers









Related Tutorials/Questions & Answers:
Advertisements