如何运行 Solaris 11 或 Cloud Solaris 11、Android Java?或者我可以使用相同的 Solaris 11 java。这是我正在尝试的脚本,它适用于 Solaris 11,但不适用于 Android。
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class HelloNonsenseDroid
{
private static String myInput = "no";
public static void main(String[] args) throws IOException
{
System.out.print("Q. Are you Xroid? Answer. ");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
myInput = br.readLine();
if (myInput.equals("yes"))
{
System.out.println("Yes! you are genius");
} else {
System.out.println("No! what in the earth, is No! try to learn to say \"Yes, we can\"");
}
}
}