| | what are the advantages of c++ and what are the advantages of java? what one is more userfriendly, and what one has more capabilities? |
| Nov 21, 2009 |
Afrothunder has some excellent points. However, as systems get faster Java's speed in no longer critical issue. If you are new to programming, Java is the perfect language to learn computer concepts. I teach Adnanced Placement Computer Science in high school. I have taught BASIC, Pascal, C++ and now Java to high students. Try teaching students to write game programs for their cell phones with C++ and you will appreciate Java's portability. Everything you need to start programming in Java i...
read more.
QUOTE Java is designed to be simple, object oriented and similar to C++ while removing the unnecessary complexities of C++. It is also said to be a robust, architecturally neutral, portable, interpreted, threaded, dynamic and high performance language. Java enables the development of robust applications on multiple platforms in heterogeneous, distributed networks. C++ is not truly portable nor is it suited to heterogeneous, distributed networks. While C++ excels in high performance, its powerful features and complexities are often the source of many errors.
Oh, and you can run Java programs and applets on any computer, no matter what the OS, as long as it's equipped with the Java Virtual Machine, which is free.
C++ can be a very fast language when compiled hence its use in device drivers and other core applications (alongside C). Java is moer userfriendly for writing applications for that will contain a GUI as it is mostly self contained and will run completley indipendantly of system or operating system. C++ does not have this advantage and external compile files or systems may be required to run software you design, this is especially true on linux and unix.
what one is easier to create graphics with?
and what one requires more computing power? Java, as stated before, can be complied to run on the JVM. This creates a multi-platform application that you can easily distribute. The only negative part about this is performance, where the JVM is often sluggish and not fully robust enough for me to trust. I'm using a Yearbook creation software for a school, and it's the most poorly designed (and hideous) program I've seen in years, and I suspect that the problems lie mostly in the Java architecture rather than program design (could be wrong, but honestly, would anyone purposefully write a program that requires you to quit the application to open a new file?) I hated the JVM, and probably always will. C++ has its downfalls as well. It's harder to learn (generally), but more importantly, it's a ***** to actually port to other processors. Since most APIs are processor specific, you'd have to find a comparable API to fill in the gaps that can't be used again. The OOP concept is essentially the same, so that's a moot point here. If I had to classify Java and C++, I'd say Java is for learning, and C++ is for coding. C++ has significant advantages when it comes to performance, and can smoke Java in equal settings.
QUOTE C++ has its downfalls as well. It's harder to learn (generally), but more importantly, it's a ***** to actually port to other processors. Since most APIs are processor specific, you'd have to find a comparable API to fill in the gaps that can't be used again. The OOP concept is essentially the same, so that's a moot point here. You mean each Operating system has its own API's. C++ if coded with portability in mind, is very very very easy to port. Just re-compile. aslong as you stick to C++ standards ( for example using fstream for file access instead of microsofts FILE class, < which does exactly the same thiing as fstream, except its not portable>) Infact, The only parts that are difficult to port between windows, and the rest of the OS's is the GUI. and this can be nullified by using the GTK, QT or SDK libraries in c++ for GUI control. In other words... IF a c++ project is designed with portability in mind, porting is as simple as a re-compile. ANYWAYS... advantages of Java which nobody has pointed out jet... 1) Garbage collection. in java you dont have to delete memory when you have finished with it, it is virtualy impossable to wrte a program in java which suffers from memory leaks. 2) No Raw memory access. Although c++ raw memory access is lightning fast, Java takes away memory manage,ment from the porogrammer, making it virtually impossable to make a mistake which could result in a buffer overflow vunerability. Some aspects or very confusing though. for example in c++ you can simply declair an array of user defined object, and begin using them.. example CODE myObject objectArray[ 100 ]; BUT in java, to do the same thing you need to CODE myObject[ ] objectArray = new myObject[100]; for(int n=0; n<100; n++) { objectArray[ n ] = new myObject; } this is because, in the java virtual machine, line one one creates an array of 100 pointers to myObject, you then need the loop to create 100 objects and assign them to pointers This part of the java language only makes sence if you understand memory management and pointers (which you will only get from learning c or c++) QUOTE (Soleq @ Mar 10 2005, 04:35 PM) It depends on what you mean by graphics. For a simple GUI, Java's Swing API is easy to use, and usually built in or included as an add-on package to install. There's another GUI API, but it slipped my mind. I always just used Swing. I don't think that's the JVM's fault, it sounds more like a creation of a dumb programmer. After all, Oracle SQL was written in Java....
Java, as stated before, can be complied to run on the JVM. This creates a multi-platform application that you can easily distribute. The only negative part about this is performance, where the JVM is often sluggish and not fully robust enough for me to trust. I'm using a Yearbook creation software for a school, and it's the most poorly designed (and hideous) program I've seen in years, and I suspect that the problems lie mostly in the Java architecture rather than program design (could be wrong, but honestly, would anyone purposefully write a program that requires you to quit the application to open a new file?) I hated the JVM, and probably always will. C++ has its downfalls as well. It's harder to learn (generally), but more importantly, it's a ***** to actually port to other processors. Since most APIs are processor specific, you'd have to find a comparable API to fill in the gaps that can't be used again. The OOP concept is essentially the same, so that's a moot point here. If I had to classify Java and C++, I'd say Java is for learning, and C++ is for coding. C++ has significant advantages when it comes to performance, and can smoke Java in equal settings.
Let me share my knowledge about Java and C++.
C++ was here before Java came and its obvious for C/C++ to grab large portion of the market. but it does not make C/C++ the only programming language. Everyone Prefers C and C++ because it works as a middle tier of highlevel language and lowlever language. you get both power of programming at root as well as at the top. due to this popularity there are more C/C++ compiler than other languages. like GNU C++ or G++, Turbo C++, Borland C++, Devshed C++, MS C++ and many more they come in many flavour. some are specifically for windows. like VC++. I have not heard any one coding application in VC++ for Linux. Due to this popularity C and C++ has become powerful more and more day by day and today it stands as a ruler in languages. And Microsoft had added a new flavour to C and C++ called C#. Though C# is made from the scratch. It is based on the same norm of C and C++. C++ is handy as it supports both the structured programming and OOP. It is easy if you do not get overdriven by Pointers and end up crashing your software with an error reading "Illegal Referenc to this and that" or "Null Pointer Assignment". Memory management in C/C++ is totally on hands of a programmer. Though there are software to check the memory leaks and garbage collection. But memory management is tedious in C/C++. If you are well with Pointers and memory management then C++ should be your choice. And talking about Graphics and others there are plugin API specially for Graphics, I think much of the graphics software or games are made in C/C++ and their other flavours. Java is great Programming language. And I like to code in Java than in C/C++ because of its ease of use. I have heard that the codes in java are 4 times smaller than the codes written in C/C++ for the same job. Java manages memory itself by its garbage collector. and it eliminates the pointers and itself is based on references. I mean any variable you create are references. Java is easy to use for the programmers from the C/C++ background coz it has the same look and feel of coding.[The curly braces I love Curly braces{}] Graphics in Java is good. The new JDK2 comes with more powerful Graphics API and I think you will hardly need 3rd Party API. Moreover Java is platform independent and secure. You can port your program to any platform without any hassle. I code Java program in windows and use it in Linux and viceversa. Its fun. you need not bother about portability as long as you have JVM running.... And there are many to follow... Now you make choice which one is better.. Latest Entries
Afrothunder has some excellent points. However, as systems get faster Java's speed in no longer critical issue. If you are new to programming, Java is the perfect language to learn computer concepts. I teach Adnanced Placement Computer Science in high school. I have taught BASIC, Pascal, C++ and now Java to high students. Try teaching students to write game programs for their cell phones with C++ and you will appreciate Java's portability. Everything you need to start programming in Java is free, I repeat FREE. Even the J2ME to create programs for cell phones is free. So far based on my personal experience and from feedback I have received at blogs like this, the majority of negative comments on Java seem to come from C++ programmers who have less than one year serious experience with Java. They are too proud to admit what they don't know or to ask for help!
-reply by Jose
Replying to qwijibow
I don't think that is correct. In Java you declare a user defined object array as (for example Student class objects) ArrayList<Student> list = new ArrayList<Student>( ); You don't bother with pointers, you don't have to use a for-loop. That's it! -reply by Jose
I'm primarily java programmer, but some years ago I used c++ as my primary programming language.
I can list some(not all) features which are big adventages in java: 1. garbage collector (you don't think about empty pointers) 2. numerous libraries (especially open-source libraries) 3. almost full object programming 4. cross-platform programming and running 5. you can write programs and pay nothing for licences(free IDE, free frameworks etc.) 6. very big community
The whole reason java and C++ are so similar is because java is based on C++. It was acctually made to be used more in web development anyway, something which C++ was lacking. Java cut down on all the memory management and such in order to make web programming easier (try programming the memory managment when you have to think about IE or some other random browser in the mix too....).
i know people have already posted alot on this, but here'e my 2 cents.
java is easy. there are a HUGE number of libraries that sun and other people have provided. No matter what you are trying to accomplish, if you look hard enough, you'll find that someone has already written a function to do it for you. In C++, there are quite a few default libraries, but you deal with alot more in depth coding using system calls and whatnot. THis is even more true if you use C (which I do). Besides this, the syntax for the languages are pretty similar, and each could be written to look like the other. The real difference, as I see it, is the performance. C/C++ has very little abstraction between the program and the operating system, making it very fast. Java, on the other hand, has a virtual machine between it and the OS, which increases portability, but decreases speed immensly. Also, java is an entirely interpreted language, which (very basically) means is compiles each line as it reads it, slowing it down further. In the end, unless you're writing an applet for use on a website, theres no reason to use java if you've got a decent amount of programming skill. -afrothunder
Similar Topics
Keywords : advantages, java, c
(2) I have been using the picking tool with setShapeCylinderSegment (this returns infinit results but (6) Alright, I'm having some really funky issue with this. I know it's a mismatch (obviously) One Variable; Multiple Classes (5) I’m probably the only person that is able to do so much with Java3D and yet still can't (6) I have looked all over the web for a solution and none of them seem to work. Anyway, I am trying to (11) First thing, I know the pictures say update 3, I'll update them to 4 soon... Since there's (2) I am currently using a 3D cad software to make models. I want to know if it and how it is possible (2) Now I am a compleate newbie to java. Now just from saying that I will get posts that say "read the How do you make them? (4) Ok, right now I am currently using eclipse, however I can change to whatever if there is something What is the difference? (2) Ok, so previously I had installed the java SKD on my computer (the one that comes with netbeans), as (5) Hey all Java programmers on Astahost, I'm wondering is it possible for Java to communicate to (7) hi, Im new to xml parsing and dont know much about. I need to modify the attribute val of a tag in Step by step help needed from seniors in programming for developing a (2) Dear senior Members, I am a 18 year old boy. Just some months ago...I thought of an idea of (11) Well..can someone introduce me?(picture introduce is well).... (17) Dear friends I came to know that one can build exe files from java application. How this is A console base java phone book program (5) Hello everybody I wrote this program a few months back when I wan learning JAVA.I haven't Sound in Java (3) I know how to play a sound file in an applet and an application. I was wondering though if anyone A game i programmed with a friend (2) My friend and I have been working on a project. It is called Snake, and its the old fashion snake (1) Can someone help me?.... additions / criticisms invited (10) im basically a C++ programmer and into Java only now..and i seem to falling in love with it. here (12) I have this Java Application that is already coded which interacts with a database. Is there any (26) Hello Java people! I'm starting to work more on java this spring (university stuff) and I think video streaming in web browser (2) Can anyone give idea about video streaming in web browser through java or jsp I need to play video (8) Java was the first programming language that I learned on my own...no teachers, no friends, just me Java Books (17) Download java books from below sites http://www.gayanb.com/ The eBook links you've posted (7) Heya guys, Been a looooong time eh, yeah well i was kinda buzy with college stuff and all those Does anyone hava a decent JAVA method (21) does anyone have a decent JAVA method that will sort an array from smallest-to highest? Java,jsp,servlet,Swing,GUI Designing (14) /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> Common guys (7) How do u use system date in java? I only know how in jsp. In jsp, u need to do the code below to get (4) hi, all, I have a question, can anybody give an answer? Thanks in advance. Why the following code Looking for advantages, java, c
|
![]() What Are The Advantages Of Java Vs C++? |
Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com