Paper Details  
 
   

Has Bibliography
4 Pages
1089 Words

 
   
   
    Filter Topics  
 
     
   
 

java vs c

nd develop answers without changing the questions, are numerous. OOP facilitates creating reusable code, which can save a lot of work. Information can be hidden to safeguard data from improper access. Polymorphism lets the programmer create multiple definitions for operators and functions, with the programming context determining which definition is used, also Inheritance lets the programmer derive new classes from older ones. When using OOP, the programmer can focus on representing concepts, instead of concentrating on tasks. (Prata 1995, 6)Java, although in many respects similar to C++, is actually just a more simplified version of the latter. Java has a C++ like syntax, but it is more purely object oriented, also, memory management, which can be a problem with C++, is no longer a factor with Java, due to the fact that Java incorporates a built in garbage collector, which makes it unnecessary to explicitly free allocated memory.(Kaj 1996, 1) Another difference is that Java, unlike C++, does not contain pointers.(http://www.ftc.nrcs.usda.gov/devtools/java/java/noMoreC/index.html) (A pointer is a variable that tells a computer where data is placed.)(Prata 1995, 93) Java does not have an explicit pointer type, instead, it does passes all arrays (information entered into the program and stored in memory) and objects by reference,(http://www.ftc.nrcs.usda.gov/devtools/java/java/noMoreC/index.html) meaning that the objects or arrays in question have been defined elsewhere in the program, and the programmer does not have to keep pointing out where that information is stored. Since Java does not contain pointers, struct and union (two C++ favorites) are not part of the language because they rely on pointers to function.(http://www.ftc.nrcs.usda.gov/devtools/java/java/noMoreC/index.html)Java differs from C++ in other ways too, command line arguments that are passed to a Java application are different in number and type than those pa...

< Prev Page 2 of 4 Next >

    More on java vs c...

    Loading...
 
Copyright © 1999 - 2024 CollegeTermPapers.com. All Rights Reserved. DMCA