udayalakshmi
method inside the method??
0 Answer(s)      3 years and 10 months ago
Posted in : Java Interview Questions

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???

Advertisement
View Answers