How java is platform independent?
Answer Posted / invisible
When you write the program for any programming language it
is called (source program), and it will have the extension
depending upon the language. For example, the C language
will have the extension ".c" and ".cpp" in C++.
When you compile the file or (source program), you will get
the ".exe" extension. This ".exe" file is executed by the
operating system in the C & C++ program.
If you are writing the program and compile it in one
operating system, you cannot take the same ".exe" file to
another operating system for extension. That means, this
program depends upon the operating system for its execution.
In Java, when you write the program, you will have
the ".java" file. And when it is compiled, you will get
the ".class" file. The ".class" file is executed by the
Java Virtual Machine (JVM). If you have the JVM, you can
execute the java program anywhere under operating system.
That means, that Java is PLATFORM INDEPENDENT.
| Is This Answer Correct ? | 191 Yes | 18 No |
Post New Answer View All Answers
Explain the inheritance?
Can we execute a program without main() method?
hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea
What is the difference between length and length() method in java?
How to create an interface?
What do you mean by inner class in java? Explain
What is the difference between a synchronized method and a synchronized block?
What are encapsulation, inheritance and polymorphism?
What is the use of join method?
What is polymorphism and what are the types of it?
Which package is imported by default?
Is singleton set an interval?
What is byte value?
What is the difference between serial and throughput garbage collector?
What is difference between null and void?