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
Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).
What are the files generated after using IDL to java compiler?
Which is better list or arraylist in java?
Is a class subclass of itself?
How to split arraylist elements in java?
Can you override a final method?
When is an object subject to garbage collection?
What are data structures in java?
What is boolean strategy?
How does java enable high performance?
How can we create objects if we make the constructor private ?
What are heap memory and stack memory and what are memory tables.
What is the purpose of the enableevents() method in java programming?
How does hashset works in java?
Can we extend private class in java?