How java is platform independent?
Answer Posted / santosh sahu
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 ? | 9 Yes | 2 No |
Post New Answer View All Answers
How will you reverse a singly-link list?
What is ternary operator?
Write a method to check if input string is palindrome?
What is difference between pointer and reference?
Can we override data members in java?
What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?
What is javac in java?
Explain what access modifiers can be used for methods?
what is object slice?
How do you implement singleton class?
What is isa relationship?
What is mean by exception?
Which class is the superclass for every class in java programming?
Can you pass by reference in java?
How do you override a method?