Similarities to C++
Other similarities between Java and C++:
Two types of comments (// and /*   */)
Support for function overloading (unlike C)
Static member functions (equivalent to C’s
global functions)
Global functions are not permitted in Java
They don’t have a this pointer
They can’t call a non-static member function without
an object of the class
Don’t overuse them if you are doing OOP!