Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,395 members, 7,808,390 topics. Date: Thursday, 25 April 2024 at 11:22 AM

Why Java Is Great - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Why Java Is Great (1385 Views)

Help! Double Data Type In Java Is Rounding Off My Result To .00 / Why Java Is Still Relevant / What Level Of Java Is Required For Android Programming ? (2) (3) (4)

(1)

Why Java Is Great by logic101: 12:12am On Aug 20, 2011
Why Java is Great
Simple grammar - Java has a very simple grammar familiar to anyone with experience in C and C++, which must be 99.9% of programmers. The BNF for Java has about 50 rules; that for C++, about 140. And C++ also has templates and a preprocessor in addition to the grammar. Java just got quite a bit more complex in 1.5 (excuse me, Java 5). They haven't even released a new version of the language spec yet.
Portability - These days Java really does run well on all the popular platforms (Linux was a little behind, until Sun realized they needed them, now it's just FreeBsd, OpenBsd, and NetBsd lagging) (Too bad that Ruby, Python, Perl, Squeak don't work well on most platforms, Oh wait, they do!)
Speed - The latest JIT compilers for Suns JVM approach the speed of C/C++ code, and in some memory allocation intensive circumstances, exceed it. (Too bad Ruby, Python, Perl, and Squeak don't even come close)
Standard APIs - You can happily write your code knowing that the standard java.* libraries will be waiting on the client for it, assuming a recent enough version of Java is installed
GarbageCollection - the programmer doesn't have to worry about memory (most of the time)
VM - see WhyAreVirtualMachinesGreat
interface vs. class
CheckedExceptions (some people hate this, but its optional) (some ppl love it)
single class inheritance
singly rooted class hierarchy (the reason that lack of templates isn't a killer)
no OperatorOverloading
reflection
Inherent support for dynamic linking and loading.
Guarantees of binary compatibility w.r.t. changes to linked code.
fast edit/compile/run cycle faster than what?
I can only attest that this makes EclipseIde great. It is wonderful to be able to make small changes to a class and have the recompiled class linked into the running application for immediate testing. I don't know whether this is possible in other Java environments.
broad industry support
safe semantics -- no UndefinedBehavior in pure Java code
Security model for restricted execution
It's relatively easy to make programs that parse or produce classfiles (but not as good as lisp)
MrBunny's Big Cup O' Java (By high-performance we mean adequate. By adequate we mean slow.)
But, hey, at least it ain't BANCStar [BancStarLanguage]
Code is fairly transparent: except for a bit of built-in magic to do with String, code never invokes methods implicitly. (By contrast it's in general impossible in C++ to work out in isolation what a statement will do.)
No FragileBinaryInterfaceProblem
JavaDocsForLibraries
Re: Why Java Is Great by Fayimora(m): 12:19am On Aug 20, 2011

(1)

How Can I Find Programmers And Investors To Help Me Build My Social Network. / Nancy Fx: How To / 20k For Grabs

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.