-
Essay / Java and Java - 691
Object-oriented languages have become the modern standard for structured programming. Two modern languages that both implement the object-oriented paradigm are C++ and Java. C++ is a free-form, compiled, mid-level language. It was established in 1983 and its most recent revision is C++11, revised in 2011. Java is a class-based object-oriented language, considered a higher level programming language than C++. Java is actually built on top of C and C++. Both languages are widely used on many platforms. As object-oriented programming languages, Java and C++ have features in common. However, the implementation of many features differs between the two. Both languages use a class-based style of object-oriented programming. They also feature generic programming, which is a paradigm that allows one to write code capable of performing relevant operations on a variety of applicable types. The syntax between Java and C++ is extremely similar. Control flow statements are interchangeable between Java and C++ and include if, if-else, else, switch and while, do-while and for loops. Statements such as “pause; » and “continue”; are used in loops in both languages. C++ supports a control flow statement that Java does not support, namely the "goto" statement. C++ and Java also share a very similar set of arithmetic operators. Java and C++ are extremely different in implementation details due to different design philosophies and needs. On the one hand, C++ runs directly on a platform's processor by being compiled directly into machine code, much like C. Java runs in a virtual machine, which is compiled into C and C++. Due to running on a virtual machine, Java can only access the platform's native functionality through the use of the native Java interface,...... middle of paper ...... for create a foundation for programs to build on. The C++ programming community writes third-party libraries that other C++ programmers can use. Java's standard library includes everything one could want or need to create most programs, plus a graphical interface. Both languages are robust and have many useful features. Java offers an easy-to-use language, based on logical ideas based on names, with restrictions that prevent unwary or new programmers from creating stupid bugs with their programs. C++ places more responsibility on the programmer, but gives them more freedom in the way they can implement their solutions. As a hobbyist programmer, I prefer Java's security features and large standard library, although I desire the freedom that C++ offers, although I am learning more about how to handle the responsibility that C++ places on the programmer.