• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Features of Java?

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What are the most important features in Java language that make it better to use than C , C++ languages ?
 
Saloon Keeper
Posts: 15491
363
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my opinion? The garbage collector. Arguments are passed by value. All objects must be used through a reference. Code runs in an environment that abstracts the system's details away. Great standard API. Great documentation. Great community.
 
Ranch Hand
Posts: 954
4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think polymorphism is most important thing as compare to C.
 
Ranch Hand
Posts: 135
5
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Arguments are passed by value. All objects must be used through a reference.


There is no such thing as "pass-by-reference" in Java. One of the famous discussions i've ever found.

I think, Object Orientation is what made Java more famous. Platform independence had gave some push up at the early stages when the language was first released, in late early 60's.
You can simple find answers for this question with a simple google search.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:In my opinion? The garbage collector.


I agree with Stephan, especially if you are coming from C++ then the automatic memory management (the garbage collector) is one of Java's best features. I was a C++ programmer before I was programming in Java long ago. I remember that in C++ you always had to think about when and where to free memory, and if you made a mistake you'd have a memory leak. Java's automatic memory management means you have to think about that a whole lot less.
 
Stephan van Hulst
Saloon Keeper
Posts: 15491
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jude Niroshan wrote:

Arguments are passed by value. All objects must be used through a reference.


There is no such thing as "pass-by-reference" in Java.



Just to clear up any confusion, by "All objects must be used through a reference" I was referring to the fact that you can not use them as if they were 'structs'. All variables of a reference type actually store a pointer.

I think one of my favorite differences is... no header files, or messing with circular dependencies! God, forward declarations could be a real pain in the backside.
 
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A robust platform with a virtual machine which runs reliably.
 
Dalin Mansour
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for all of you. Your answers are very helpful.
reply
    Bookmark Topic Watch Topic
  • New Topic