method inside the method??

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

Ads









Related Tutorials/Questions & Answers:
method inside the method??
Can a method inside a Interface be declared as final?
Advertisements
Can a method inside a Interface be declared as final?
Can we declare a static variable inside a method?
method
method
Application scope variable inside ServletConfigListener
ModuleNotFoundError: No module named 'inside'
Creating circle inside a circle
UITextview inside UITableviewcell
plotting of points inside a rectangle
searching inside a file for details
uitableview inside uiviewcontroller
user defined function inside a jsp
ModuleNotFoundError: No module named 'docker-inside'
ModuleNotFoundError: No module named 'docker-inside'
Java Function for block inside a block
Java Function for block inside a block
how to add panel inside frame?
get method
Set Frame Inside HTML
method question
Method
ModuleNotFoundError: No module named 'inside-out-proxy'
Method Overloading
Method Overloading
cannot declare variable inside @interface or @protocol
Tag Inside Table in HTML
abstract method
Static method
gc() method

Ads