Home arrow Java & J2EE arrow Page 4 - Completing the Syntactic Comparison of Java and C/C++

Conclusion - Java

This is the second half of the two-part series on the syntactic comparison of Java and C/C++. Before we begin, I’d like to encourage you to read its first part if by any chance you’ve missed it. It is called “Syntactic Comparison of Java and C/C++” and it’s published right here. You shouldn’t miss it because grasping the basics is crucial.

TABLE OF CONTENTS:
  1. Completing the Syntactic Comparison of Java and C/C++
  2. Classes continued
  3. Other Distinctions
  4. Conclusion
By: Barzan "Tony" Antal
Rating: starstarstarstarstar / 6
November 28, 2007

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

As I promised, I won’t finish this two-part series without enumerating a few of the features that are missing from Java but present in C. Dozens of features were intentionally “left out” from Java. Let’s name a few: structs, unions, friend functions, and so forth. There are well-rationalized reasons for not implementing these.

Needless to say, in most cases there are other, better ways to accomplish the same algorithmic requirements that are safer and more robust. Java focuses mostly on maintaining portability and enhanced security. Therefore, many of the features that allowed programmers to create “havoc” either by mistake or design were removed.

Hopefully I’ve pointed out enough distinctions between Java and C/C++ for you to get excited about. It certainly isn’t a hard language; many experienced coders or even newcomers have a positive attitude toward Java — some go so far as to cheer “It’s fun!”

If you currently have experience with C and/or C++ then picking up Java won’t be hard. All you need to do is actually get familiar with its particular class-like inner workings and practice — a lot! Within a few days you could find yourself porting your favorite source codes into Java just for the sake of it.

Java, as a programming language, was created to help programmers. Its main purpose therefore is to assist programmers to code with ease while maintaining a very high level of portability. As a result, Java is a very powerful and useful language.

Nevertheless, it is not suited for all kinds of applications. We shouldn’t forget that Java is half-interpreted. Moreover, coding something in Java does not always result in an efficient way of programming that specific application. With C/C++ you also have more permission to access the system’s resources (i.e., direct memory access) and significantly faster execution speed. By no means should C++ be tossed out or forgotten.

Java is not a replacement or one-does-it-all programming language. It’s really useful to be familiar with it and use it for well-thought-out specific purposes; it also looks good on a resume or CV. From time to time you might run into projects that would work more efficiently when coded in C++; these are the cases when you should leave Java alone. Forcing a particular language on a project it does not fit won’t work well at all.

With these things said, I am now ending this series. I truly believe that you could extract valuable information from it; that would mean it has served its purpose well.

Don’t ever forget — learn, practice, and practice. It’s simple: keep coding!



 
 
>>> More Java & J2EE Articles          >>> More By Barzan "Tony" Antal
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

JAVA & J2EE ARTICLES

- More Java Bugs Lead to More Attacks
- Oracle's Java One Brings News, Surprises
- Oracle Patches Java Runtime Environment
- Apple Syncs Java Update with Oracle
- Spring 3.1 Java Development Framework Compat...
- Jelastic Java PaaS Availability and Pricing ...
- NetBeans 7.1 Released, Supports JavaFX 2
- SolarWinds Releases Newest Version of Java M...
- Free Monitoring Tool for Java Apps on Heroku
- Heroku Adds JCloud Platform Support, Java 7 ...
- Java SE 8 Speculation in Full Swing
- Java SE 7 Now Available
- New JVM Language and Java Reporting Tool
- Java 7 Release Update and New Eclipse Toolkit
- The Best Java Netbeans IDE Plugins

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: