Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

method inside the method??

Ads

 
 

Share on Google+Share on Google+

udayalakshmi
method inside the method??
0 Answer(s)      5 years and 8 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???

Ads
View Answers
Ads