+ 1
can i create an method inside the main method and also call it inside the main method
4 Answers
+ 3
You can do it using lambda expressions/functions.
For example in C++ like:
auto fn=[]{ std::cout<<"You called";};
fn();
+ 1
An expression is not a method. And there is no need to do this!
0
thanks man.. appreciate the help.. i was stuck