Java編譯器

Java编译器是Java编程语言的编译器。Java编译器最常见的生成文件是包含Java字节码的Java类文件。Java虚拟机加载Java类文件，并解释或即時編譯Java字节码為机器代码。

 class secondmax {
      public static void main (String args[]) {
                int n,temp,fmax=0,smax=0;
                Scanner sc=new Scanner(System.in);
                System.out.println("Enter how many numbers will you enter:");
                n=sc.nextInt();
                for(int i=0; i<n; i++) {
                     temp=sc.nextInt();
                     if(i == 0) {
                        fmax=temp;
                     } else if(temp > fmax) {
                        fmax=temp;
                     }
                }
             
             System.out.println("First max: " + fmax);  
             System.out.println("Second max: " + smax);  
      }           
 }

外部链接 

 Sun's OpenJDK javac page 
 JSR 199  Java Compiler API Java Specification Request for invoking the Java compiler from a Java program
 Stephan Diehl, "A Formal Introduction to the Compilation of Java" , Software - Practice and Experience, Vol. 28(3), pages 297-327, March 1998.

Java规范请求