0
在我的代碼中,我放置了一個主要方法。該程序編譯jgrasp沒有錯誤。但它一直給我一個消息,說:在文件jgrasp中找不到主要方法,小程序或MIDlet
import java.io.*;
public class XOREncyrption
{//start of class
public static void Main(String [] args)
{//start of main
File f = new File("data.txt");
File g = new File("key.txt");
try
{
FileInputStream r = new FileInputStream(f);
FileInputStream x = new FileInputStream(g);
byte [] me = new byte [(int)f.length()];
byte [] we =new byte [(int)g.length()];
int why = r.read(me);
int where =x.read(we);
//input.close();
}
catch(FileNotFoundException e)
{
System.out.print("No file");
}
catch(IOException e)
{
System.out.println("error");
}
}//end of main
}//end of class
「文件jgrasp沒有發現主要的方法,小程序或MIDlet的」如果任何人都可以找出原因的代碼是告訴我沒有main方法時,有一個人,我會很感激。