Comparison on using Java for an Operating System instead of C
Last Updated :
13 Jun, 2019
Java is a managed language which offers memory safety.
In Java, pointers do not exist, so we cannot do pointer arithmetic on a function pointer. An application can invoke a method defined in a class through the class object. In Java, we cannot do unsafe typecast of an object to overwrite the method pointer with something else. An out of bound array access throws a runtime exception in Java, so return address corruption is not possible.
Now, let us look at some important aspects of an Operating System implemented through Java.
Therefore all the Operating Systems use C language extensively instead of Java.
Share your thoughts in the comments
Please Login to comment...