我想要在控制台中显示一条消息或者弹出一个消息,所以如果没有指定参数,我想知道我应该显示哪个
就像是:
if( !file.exists() ) {
if( fromCommandLine()){
System.out.println("File doesn't exists");
}else if ( fromDoubleClickOnJar() ) {
JOptionPane.showMessage(null, "File doesn't exists");
}
}
Run Code Online (Sandbox Code Playgroud)