Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why isn Java pre-compiled like C?

Java pre-compiled
0
Posted

Why isn Java pre-compiled like C?

0

The JIT may seem like an odd concept to you. After all, C compilers compile the C code ahead of time so it is ready to go as soon as you start the program. Why wait for the last minute for Java? Wouldn’t it be simpler and less costly to compile Java ahead of time as well? As in many things, in this case the seemingly intuitively obvious answer is dead wrong. The reason Java is not compiled ahead of time like C (or pascal or most other languages that came before it) is because Java is a very different kind of language. C and the other languages we mentioned are all “early bound languages.” What this means is that in a C program, the code that has to be run as a result of every function call is known at compile time. In C++ this is true for all but “virtual” method calls. Java however is late-bound. Because classes are loaded individually at run-time, and because any call can be over-ridden by a sub-class (except final calls but they only exist for specific security programming reasons a

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123