File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java beginner

 
geetha priyadharisini
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
please can anyone tell me what is platform independence.
 
parag dharmadhikari
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello geetha , i am also a java beginner and will try to give answer as per my experience and knowledge.
let us a take example of C code.
if one has written the code in C and compiled it on one machine say on windows then CPU will generate the executable file for that code. so programmer has just to excute that file. Now this file is created in binary language which will be understood by only windows and not by any other system.
so when that programmer wants to run the same C code file on other system like macantosh then whole C code has to be ported to the new system, this is because only copying binary excutable from previous windows system won't run the program as this binary language is specific to each type of system. This is system dependency.
Exactly reverse is system indepedency.
So in java if code file that is ".java" file is compiled on windows then it generates ".class" file. So this ".class" file is enough to port on any other system. There is no need to transfer all the code that is all the ".java" files.
This happens because JVM (Java Virtual Machine) inserts one more stage before creating the binary executable and that is converting java code into byte codes using interpreter facility.
This byte code is independent of any machine and can run on any type of machine provided JVM is available on the system.
Then this byte code get converted into binary language using compiler.
Thus java is platform independent language.
I hope you have got your answer.

 
Brett Knapik
Ranch Hand
Posts: 255
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
couldn't have said it better myself
------------------
I wish there was a button on my monitor to turn up the intellegince.
Theres a button called 'brightness' but it doesn't work
 
geetha priyadharisini
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi parag!!
thanx for ur reply.i'm very much clear with ur answer.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic