Is it possible to define a function within a function in Java? I am trying to do something like:
public static boolean fun1()
{
static void fun2()
{
body of function.
}
fun();
return returnValue;
}
but I am getting error Illegal start of expression
.