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.