why java is platform independent?
Answers were Sorted based on User's Feedback
Answer / gunjan
java is platform independent as JVM compiles source code to
its byte code which is then interpreted to object code.thus
any machine having a java compiler can execute that byte
code.this does not depends on the hardware or the OS of the
system
| Is This Answer Correct ? | 42 Yes | 9 No |
Answer / guest
Java is compiled to an intermediate form called byte-code.
A Java program never really executes natively on the host
machine. Rather a special native program called the Java
interpreter reads the byte code and executes the
corresponding native machine instructions. Thus to port
Java programs to a new platform all that is needed is to
port the interpreter and some of the library routines. Even
the compiler is written in Java. The byte codes are
precisely defined, and remain the same on all platforms.
| Is This Answer Correct ? | 36 Yes | 8 No |
Answer / pawan mangal
java uses two process compiler and second one interpreter
compiler converted source code in to byte code and this byte code is universalize because it can be run by any jvm(java virtual machine).which is a interpreter
suppose u create a java programe in windows and u compile it then u have their byte code*(.class file)as discussion it can be run on any jvm means(linx )
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / coder
JVM does not compile Java source code to byte code. It is
the Java Compiler which does that. JVM runs on the target
machine which interprets the byte code and runs the program
on the target machine.
Java is not platform independent. Though you write the Java
source code, somebody else ( Sun Microsystems ) have done
the hardwork to implement JVM for the platform which is
going to run your program. "Java is Platform Independent"
is an illusion.
| Is This Answer Correct ? | 10 Yes | 4 No |
Answer / jagan_kumar
java compiler makes the class file which is not dependent
on the hardware or software of the system where we compiled.
Every system has its own JVM(System dependent) and will
takes .class file and produces the code which is executable
on that particular system itself.
So JVM makes the code portability.
hence JVM makes the JAVA as Platform Independent.
JAVA-JVM=NO USE of producing System indipendent code.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / madhan
yes java is a platform independent. JVM(java virtual
machine) is used in java , that jvm can be converted source
code into byte code so java known as platform independent.
| Is This Answer Correct ? | 12 Yes | 9 No |
Answer / raj kumar.d
When compile a java code, the source code is converted into a byte code with the help of java interpreter. So java called platform independent.
| Is This Answer Correct ? | 2 Yes | 0 No |
Java is called platform independent because of its byte codes which can run on any system irrespective of its underlying operating system.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / asad raza
Bismillahir Rahmanir Rahim..
yes java is plateform independent, because its compiler
first convert the java code into byte-code(machine
language), which is the code that every plateform
understand, that's why it is called " plateform independent"
| Is This Answer Correct ? | 3 Yes | 5 No |
Answer / badrinath
java is platform independent b coz ,java have java virtual
machine which make java plateform
independent..jvm convert input source code into bye code
which is run on any plateform..
| Is This Answer Correct ? | 0 Yes | 2 No |
how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.
0 Answers Mbarara University of Science and Technology,
#include<stdio.h> main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }
main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); } a. Runtime error. b. 0, 0 c. Compile error d. the first two values entered by the user
Question: We would like to design and implement a programming solution to the reader-writer problem using semaphores in C language under UNIX. We assume that we have three readers and two writers processes that would run concurrently. A writer is to update (write) into one memory location (let’s say a variable of type integer named temp initialized to 0). In the other hand, a reader is to read the content of temp and display its content on the screen in a formatted output. One writer can access the shared data exclusively without the presence of other writer or any reader, whereas, a reader may access the shared memory for reading with the presence of other readers (but not writers).
Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)
A program that will create a movie seat reservation. The program will display the summary seats and its status. The user will be ask what seat no. to be reserved, then it will go back again to the summary to display the updated seat status. If the seat no. is already reserved then it will prompt an error message. And also if the input seat no is out of range then it will also prompt an error message. The program is continuously running. Termination of the program will depends on how the programmer will apply. Sample output: Movie Seats Reservation Summary of Seats: Seat 1: Available Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1 Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 6 The Seat no. is out of range! Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1 The Seat no. is already reserved! Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 0 GoodBye... Thank You!!!
Write a program that produces these three columns sequence nos. using loop statement Sequence nos. Squared Squared + 5 1 1 6 2 4 9 3 9 14 4 16 21 5 25 30
main() { static int var = 5; printf("%d ",var--); if(var) main(); }
Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };
Develop a routine to reflect an object about an arbitrarily selected plane
Sorting entire link list using selection sort and insertion sort and calculating their time complexity
1 Answers Infosys, Microsoft, NetApp,
create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00