Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what are the major differences between Java, C or Fortran? 2

Status
Not open for further replies.

rock31

Programmer
Jul 18, 2004
38
US
Hi,
I am learning Java programming. I once had experiences in C and fortran programming. Before I go further in my learning process, I wonder, what are the major differences between Java, C or Fortran? What makes Java unique or more powerful?

Thanks
 
No idea about fortran ....

Java is a less *powerful* langauage than C, in that you are one more step away from the CPU. But on the other hand, Java is easier to use than C because you do not *really* have to worry about memory management. Java's APIs are also (IMO) better organised & accessible.

Remember that Java would not be able to run without C. All OS dependant calls (file pointer &handles, all IO access, socket access, gui implentations etc etc) are all built on top of C/C++ & OS level code. Java mainly accesses these calls via a process similar to JNI (Java Native Interface).

Basically pay your money, take your choice. But Java cannot do anything that C cannot & similarly, via JNI, Java can do anything C can.



--------------------------------------------------
Free Database Connection Pooling Software
 
I used to do a lot of FORTRAN programming. I found it very useful for mathematically rich programs. Also, I took full advantage of capabilities that real programmers said were the reason FORTRAN was (and presumably still is) a bad language. I would use the "equivalence" statement, for instance, to assign the same memory space to character, and a number; things like that.
I never learned C but it was heralded by some of my fellows as the best of both FORTRAN and Assembler in that it could do everything FORTRAN could and build drivers, too.
Java does math like C does; that is, not as well as FORTRAN. On the other hand, it's much more structured than FORTRAN, which is universally held to be a good thing. Furthermore, unlike both C and FORTRAN, Java is an object-oriented language. I suppose in the strictest sense, this means that it is harder to write procedural code in Java than it is to write OO code. Likewise, it's theoretically possible to write OO code in FORTRAN although the language in no way makes it easy. The best thing about any language, in my opinion, is that you can use it. That means you can speak it and that it's understood by some platform. Java is understood by most platforms with no investment on the part of the programmer or user so that makes it pretty useful.

Bob Rashkin
rrashkin@csc.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top