Results 1 to 4 of 4

Thread: Why Java is Platform independent

  1. #1
    Geek_Guest
    Guest

    Why Java is Platform independent

    Why Java is platform independent? How it is independent from different platform ? if you take C program, it also runs same as on different machine ?

    Question asked by visitor prakashreddy


  2. #2
    Contributing Member
    Join Date
    Sep 2006
    Answers
    42

    Re: Why Java is Platform independent

    The Java code that you compile gets converted to a form known a bytecode that is present in the .class files.
    Every OS has its own JVM. The JVM takes this bytecode and then executes the program. So the hardware dependency is taken care of by the JVM.
    Hence Java is platform independant.

    A C program will have to be recompiled for it to run on different OS's. Thus it is platform dependant

    Regards,
    Sahil.


    --Smile, it makes people wonder what you are thinking!!!


  3. #3
    Junior Member
    Join Date
    Jul 2007
    Answers
    2

    Cool Re: Why Java is Platform independent

    The Java code that you compile gets converted to a form known a bytecode that is present in the .class files.Every OS has its own JVM. The JVM takes this bytecode and then executes the program. So the hardware dependency is taken care of by the JVM.
    Hence Java is platform independant.


  4. #4
    Junior Member
    Join Date
    Aug 2007
    Answers
    1

    Re: Why Java is Platform independent

    java is platform independent because it converts the given source code into byte code.every operating system has its own byte code so the java is platform independent


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact