
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???
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.