Why Java is Platform Independent and C, C++ not !!

Posted by Tushar Bedekar
Most of the people have confusion regarding this Question. So I have decided to write something on this topic. Now we will go step by step whats this

What a Platform means to us

The operating system installed on the computer is known to be a platform. Each and every operating system have different structure and format. These operating systems (platforms) differs on the basis of the following factors

  • Like the way they execute the files. 
  • On the basis of system kernels
  • The way the optimize the system for best performance and make use of processor
  • On the basis of different file extensions, etc
For example, Windows operating systems executes .exe files. 
                       Linux here everything is a file. And also here there is no specific extension. Any file                            can be executable here
                       similarly, we have Unix and Mac Os  that have their own file extensions.

Platform Independent Vs Platform Dependent

Platform Independent means the program that we have developed can run / execute (show results) on any platform. That is on any operating system.

Platform Dependent means the program / software that we have developed can run /execute (show results) on a specific platform. That is on a specific operating system.

Why Java is Platform Independent and C, C++ not !!

The programming language like C and C++  do not generate any intermediate code like bytecode in java. The C and C++ generate directly Native Code which is specific to one platform or operating system. This Native code is known as object code (Machine Code ). 

As we also know that Object Code (Machine Code) generation requires some Operating system files to be included which makes it platform dependent.
Whereas in Java we have intermediate code by the name of Byte Code (not a machine code). This can is understandable by JVM (Java virtual Machine) which converts it to the object code (machine Code) . That  why in order to run Java code we need JVM installed on the device which makes java Platform independent. 



17 comments:

  1. Learn the Basics. As with anything, knowing the basics about Java is the best place to start.
    Practice Coding. To use the old cliché, practice makes perfect.
    Java classes in Pune

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. C++ is quicker than Java, but it is not platform agnostic. The reason for this is C++'s ability to convert source code to machine code. C++ applications are only compiled to machine level if they are developed for a specific machine. Java's platform independence is mostly due to bytecode and JVM.
    In the fast-growing world to know the popularity of languages several methodologies are carried out. Even though a lot of methods exist, TIOBE is taken as a reference.

    Java has been used by various companies; likewise, top universities are conducting java courses for their students. Once you have gone well-skilled then you can easily apply for developers’ roles in the company or can become freelance for java development assignments.

    Learn more than 30 Full Stack tools and technologies and practice with multiple project. Complete Full Stack Java classes in Pune to master these skills and get a guaranteed job. ( https://www.iteducationcentre.com/java-training-classes-in-pune.php )

    ReplyDelete
  4. C++ is quicker than Java, but it is not platform agnostic. The reason for this is C++'s ability to convert source code to machine code. C++ applications are only compiled to machine level if they are developed for a specific machine. Java's platform independence is mostly due to bytecode and JVM.

    It Education is one of the best training institute has Full stack Java Classes in Pune . In-Depth Knowledge of Both Front End and Back End JavaScript Based Technologies. (https://www.iteducationcentre.com/java-training-classes-in-pune.php)

    ReplyDelete
  5. Java programming is used to construct entire programmes that may operate on a single computer or on a network of servers and clients. Java is chosen by the developer community and organisations because it allows applications to automatically adapt to specific locations and show in the appropriate language. Java is a programming language used to construct stand-alone programmes. Standalone apps can be operated on a single machine or across a network. Java may also be used to develop an applet-based tiny application programme, which is then utilised to generate a web page.

    It Education is one of the leading training institutes in Pune that offers Full Stack Java Training in Pune. Expertise in both front end and back end JavaScript-based technologies.

    ReplyDelete
  6. Thanks for sharing such useful information on java... Keep up with writing...!!!
    If you want to learn MEAN Stack training in Pune, then IT Education can be your best choice.

    ReplyDelete
  7. Great post! I found it to be very informative and well-written. Keep up the good work!

    Learn more about Best IT Training Institute in Pune

    ReplyDelete
  8. Thanks for sharing such useful information on java... Keep up with writing...!!!
    If you want a laptop under 500, then Lenovo can be your best choice...

    ReplyDelete
  9. DigiSharks is a dynamic and innovative digital marketing training program in Nagpur that will take you on a deep dive into the ever-evolving digital landscape. With a focus on practical learning, the program equips you with the latest tools and techniques to help you navigate the digital ocean like a true shark. Whether you're a beginner or an experienced marketer, DigiSharks offers a comprehensive curriculum that covers everything from social media marketing and search engine optimization to content creation and data analytics. Led by industry experts, the program is designed to give you the skills and confidence to succeed in the fast-paced world of digital marketing. So, join DigiSharks today and discover what it takes to be a digital marketing shark!Digital Marketing courses in Nagpur

    ReplyDelete
  10. excellent blog , Thanks for sharing this amazing information, Python Course In Pune

    ReplyDelete
  11. Want to find the best Chartered Accountants in the city? Visit our website

    ReplyDelete
  12. A tech-enabled logistics aggregator revolutionizes the supply chain by leveraging cutting-edge technology to streamline and optimize transportation and delivery services. Click here for more information Tech-Enabled Logistics Aggregator

    ReplyDelete
  13. Great post! I found it highly informative and well-written. Keep up the excellent work!
    Cyber Security course in Hyderabad

    ReplyDelete

back to top