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









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
clone method - Java Beginners
ModuleNotFoundError: No module named 'inside'
Application scope variable inside ServletConfigListener
Creating circle inside a circle
UITextview inside UITableviewcell
plotting of points inside a rectangle
searching inside a file for details
uitableview inside uiviewcontroller
System.out.println cannot be written inside a class
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
Method
method question
Method Overloading
Method Overloading
A method getColumnCount.
Set Frame Inside HTML
Tag Inside Table in HTML
abstract method
Static method
gc() method
method name
main method
main method
Checkbox method
abstract method
Method overriding
finalize() method
_jspService() method
init method
java method
method overloading
Method overriding
method overloading
recursive method
main method
static method
method overloading
ModuleNotFoundError: No module named 'inside-out-proxy'

Ads