Thursday, December 5, 2019

Haha Essay Example For Students

Haha Essay Home Page | Submit an Essay | Links Description of this essay : Compares java and C++DIFFERENCES BETWEEN JAVA AND C++ 1 INTRODUCTION Since its release in 1995, Java has been hyped in many places, including computer magazines, broadcast news, and the Internet, as the solution to all problems in the application development community. As it has only been around for approximately 4 years now, it is still emerging into the programming language market. The main area where Java has had a large impact had been on the Internet. It is widely maintained that Java is definitely the best tool so far for writing Internet applets. (http://www.relisoft.com/java/c_java.html) Testimony to this statement are the numerous sites on the WWW that currently use java applets. Apart from being able to create cute Internet applets, as yet Java has struggled to break into the area of application development. When compared to a language such as C++, java has some large advantages but also some disadvantages. In this paper I plan to discuss the differences between these languages and the merits of each. 2 ADVANTAGES OF JAVA One of the attractions of Java as a programming language is that is is a purely object oriented language. This allows programmers to design reusable components easily, which can reduce development time. You can churn out Java four or five times faster than C++ (http://www.mcmillan.com/JavaVs.htm) Another factor that can help reduce development time is its relatively simple syntax. Its very similar to C++, making it very easy for an experienced C++ programmer to learn Java. Also its automatic memory management, which includes a garbage collector, negates the need to keep track of pointers or delete objects. This makes it much simpler to write and understand than C++. Another advantage Java has over other languages is its portability. When a Java program is compiled, it is not compiled into native machine code, instead it is compiled into byte code which can be interpreted by a Java Virtual Machine running on the host computer. Once a specific computer architecture has a Virtual Machine designed for it, the computer can execute any Java program that has been compiled into byte code. This portability becomes evident in web based applications. Web developers can write applications in Java, compile them once, and run them on any machine that has a Java compatible web browser. Although Javas portability gives it a clear advantage over other languages, this feature also creates one of Javas biggest disadvantages. Although Javas ability for producing portable, architecturally neutral code is desirable, the method used to create this code is inefficient. Unlike natively compiled code, an interpreter must first translate the Java binary code into the equivalent microprocessor instruction. Obviously, this translation takes some amount of time and, no matter how small a length of time this is, it is slower than performing the same operation in machine code. On occasions where it is desirable for code to be as efficient as possible, Javas automatic memory management may not be the best option. In languages such as C++ where memory management is done explicitly, it may be possible to speed up a program by altering the memory allocation and deletion, but this ability is taken away from us in Java. 4.1 Theoretical Differences 4.1.1 Speed Differences The difference in speed between C++ and Java is very important. Even with all of Javas benefits, Java will not be widely excepted if it can not perform adequately. C++ has been widely adopted by developers and they will not be willing to change languages if the applications they develop with Java do not measure up to their personal and their clients standards. However, if the speed difference is negligible, developers may be willing to learn and program in Java because of the significant advantages the language offers. The introduction of just-in-time compilers for Java may have addressed some of these problems. Just-in-time compilers have brought Java performance virtually neck-and-neck with C++ (http://www.ncworldmag.com/ncworld/ncw-01-1998/ncw-01-jperf.html). 1. In Java, everything is a class. There are no stand-alone functions. Even main() is a member function! 2. In Java, everything is a reference, so the programmer must make sure that memory is allocated properly (using new!), but does not .u57ae3889adfa7735910e2a8426160d84 , .u57ae3889adfa7735910e2a8426160d84 .postImageUrl , .u57ae3889adfa7735910e2a8426160d84 .centered-text-area { min-height: 80px; position: relative; } .u57ae3889adfa7735910e2a8426160d84 , .u57ae3889adfa7735910e2a8426160d84:hover , .u57ae3889adfa7735910e2a8426160d84:visited , .u57ae3889adfa7735910e2a8426160d84:active { border:0!important; } .u57ae3889adfa7735910e2a8426160d84 .clearfix:after { content: ""; display: table; clear: both; } .u57ae3889adfa7735910e2a8426160d84 { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #95A5A6; } .u57ae3889adfa7735910e2a8426160d84:active , .u57ae3889adfa7735910e2a8426160d84:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #2C3E50; } .u57ae3889adfa7735910e2a8426160d84 .centered-text-area { width: 100%; position: relative ; } .u57ae3889adfa7735910e2a8426160d84 .ctaText { border-bottom: 0 solid #fff; color: #2980B9; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u57ae3889adfa7735910e2a8426160d84 .postTitle { color: #FFFFFF; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u57ae3889adfa7735910e2a8426160d84 .ctaButton { background-color: #7F8C8D!important; color: #2980B9; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://artscolumbia.org/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u57ae3889adfa7735910e2a8426160d84:hover .ctaButton { background-color: #34495E!important; } .u57ae3889adfa7735910e2a8426160d84 .centered-text { display: table; height: 80px; padding-left : 18px; top: 0; } .u57ae3889adfa7735910e2a8426160d84 .u57ae3889adfa7735910e2a8426160d84-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u57ae3889adfa7735910e2a8426160d84:after { content: ""; display: block; clear: both; } READ: Public Enemy Sample Essay

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.