Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

In C we use only compiler. Why java uses both compiler and
interpreter? What is its significance?

Answer Posted / rinky

If a source code is written in C,then after compilation platform dependent native code is generated which is specific to the platform and whenever if you want to execute the same source code into different platform you have to recompile the program which is wastage of time.
srcprogram-->compile-->platform1---->platform native code
srcprogram-->compile-->platform2-->platform2 native code
But coming to Java,when you compile your source code ,an intermediate code is generated(.class file)which is common to all the platforms and you can execute the .class file on any platform with the help of jvm to generate native code of the specific platform.

src prg(.javafile)-->compile(on any platform Xplatform)-->bytecode(.classfile)-->jvm(execute on)-->platform(p1 or p2...or pn)(to get native code)
that is what java's passion compile once run anywhere

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which graphs are functions?

971


what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread

947


What is a java list?

1119


If a variable is declared as private, where may the variable be accessed?

1061


Can you start a thread twice in Java?

1121


Can we define private and protected modifiers for the members in interfaces?

1105


What is unicode with example?

1215


Can a vector contain heterogenous objects?

1076


Is java ee a framework?

989


What is getclass () getname () in java?

1150


Explain the advantages of packages in java?

919


What is an array length?

904


Explain access specifiers?

1177


What are the pillars of java?

920


What is the significance of continue jump statement? Explain with an example.

1290