How the Java Language Differs from C and C++ |
There are several other minor differences between the C and C++ language and the Java language.
- Through a mechanism known as varargs, C and C++ allow you to provide a variable number of arguments to a function. This is not supported by the Java language.
- While
goto
is a reserved word in the Java language, it is not implemented or supported by the Java language.- The Java language provides a
finally
statement for use with Java exceptions. Thefinally
delimits a block of code used to release system resources and perform various other cleanup operations after thetry
statement. See The finally Block in the Handling Errors using Exceptions lesson for more information.
How the Java Language Differs from C and C++ |