This week's book giveaway is in the Cloud/Virtualization forum. We're giving away four copies of Mastering Corda: Blockchain for Java Developers and have Jamiel Sheikh on-line! See this thread for details.
hi everybody , can any one tell in which language java is written! & how java is better when compared to C++ . do provide me with the links to substantiate the answer as i have to provide the same to my employer thanx in advance
Hello Satish, Java is superior to others in the following cases 1 Coding is platform independent. U can run the class file in any environment. 2 Code reusability. If u have created a class it can be used again in other codes also. 3 It has good architecture. Basically C++ and java have many similarities. If u have good knowledge in C++ u can well verse in java bit easily. Hope this will be useful for u. All the best S Chandra Mohan
Hi Also as above; - no multiple inheritence in java (easier to understand) although there is Interfaces which does give you the feel of multiple inheritence , - no operator overloading, - no pointers, - no need to free memory explicitly as the garbage collector does this automatically, - no pointers, and no doubt many more. Cheers Col.
Originally posted by Satish Varanasi: hi everybody , can any one tell in which language java is written! & how java is better when compared to C++ . do provide me with the links to substantiate the answer as i have to provide the same to my employer thanx in advance
I just want to add and open discussion about the speed. The same code written in C++ and JAVA which will run fast and why. mahesh
Depends on optimization and the algorithms and classes used. C++ will generally be faster if fully optimized than equivalent Java code (also fully optimized). How much faster depends on the above, plus on the compilers and JVM used. It can be anything from a few percent to several times faster. On the other hand, Java is often easier to get rigth than the equivalent C++ code
I've never worked in C++, so feel free to correct me if I'm wrong... My understanding is that the class libraries available in Java are much more extensive than those freely available for C++. As a result, since so much work has already been done for you, coding takes less time. Especially in GUI development.
In general, C++ does run a bit faster. However, from the industry pro's I talk to, large Java projects can be developed much quicker. It's a trade-off that most companies are willing to make. My college prof. knows both language equally well (among several others) and probably has more C++ experience simply because it's been around longer. He says you couldn't pay him enough to go back to C++. That of course depends on how much "enough" is, but you get the picture.
99.9% of applications do not bottleneck because of the speed of the program. If you look at the bad code most of us programmers write, we can be happy that that is true. Most programs bottleneck because of network (including internet) communication and database access. Neither of those can be improved by writing better C++ code. In fact, if a typical Java program runs in a couple of milliseconds, what user is going to notice that the C++ program ran twice as fast?