Content deleted Content added
m remove broken wikilink |
|||
Line 290:
// LEGAL, the object can still be modified</syntaxhighlight>
|}
* C++ supports <code>[[goto]]</code> statements, which may lead to [[spaghetti code]] programming. With the exception of the goto statement (which is very rarely seen in real code and highly discouraged), both Java and C++ have basically the same [[control flow]] structures, designed to enforce
* C++ provides low-level features which Java mostly lacks (one notable exception being the <code>sun.misc.Unsafe</code> API for direct memory access and manipulation). In C++, pointers can be used to manipulate specific memory locations, a task necessary for writing low-level [[operating system]] components. Similarly, many C++ compilers support an [[inline assembler]]. Assembly language code can be imported to a C program and vice versa. This makes C language even faster. In Java, such code must reside in external libraries, and can only be accessed via the [[Java Native Interface]], with a significant overhead for each call.
|