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.
Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

how java is better

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java is supposed to be easier to learn!
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
There is no greater crime than stealing somebody's best friend. I miss you tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic