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
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
clone method - Java Beginners
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?
Set Frame Inside HTML
ModuleNotFoundError: No module named 'inside-out-proxy'
Tag Inside Table in HTML
cannot declare variable inside @interface or @protocol
get method
Method
method question
Logging inside HTTP and HTTPS site using J2EE
how to include an html page inside a tab
Method Overloading
Method Overloading
A method getColumnCount.
abstract method
Static method
gc() method
method name
main method
main method
Checkbox method
abstract method
Method overriding
thread inside other thread - Java Beginners
Building a secure website inside a login box
finalize() method
_jspService() method
init method
java method
method overloading
Method overriding

Ads