top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Why java is both compiled and interpreted language?

+2 votes
Why java is both compiled and interpreted language?
posted Feb 6, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Java is a compiled language because the source code is converted into byte code. This byte code is not a machine code.

Java is an interpreted language because the byte code is interpreted by a virtual machine.
The virtual machine allows the java code to be run on any platform.

This route was chosen by the creators of java to allow the language to be machine independent.

answer Feb 11, 2015 by Karthick.c
Similar Questions
+1 vote
public class example 
     int i[] = {0};
         public static void main(String args[])
         int i[] = {1};
      public static void change_i(int i[]) 
         i[0] = 2;
         i[0] *= 2;