Java inherited many features from C++, but some of the important differences are mentioned below.
importis the rough equivalent of C++'s
#include, but it doesn't include source code - it simply tells which .class/.jar files can be searched for symbol definitions.
deleteto deallocate objects. When there is no longer a reference to an object, it is eligible for automatic garbage collection when memory is needed. This is one of the most wonderfully profound improvements Java made over C++.
charis two bytes containing a Unicode character: first 128 characters same as ASCII, first 256 same as ISO 8859-1 (Latin-1), remainder encode basically all modern human scripts.