Question and answer is powered by AnsPress.io
A method is a function that is written in a class. This means whenever a function is written in Java it should be written inside the class only. But in C++, we can write the function inside as well as outside the class, they are called member function & not methods.