application1.java
来自「提供了常用的JAVA技术的示例」· Java 代码 · 共 33 行
JAVA
33 行
package ifelse;import javax.swing.UIManager;import java.awt.*;import java.io.*;public class Application1 { //Main method public static void main(String[] args) throws IOException{ InputStreamReader ir; BufferedReader in; ir=new InputStreamReader(System.in); in=new BufferedReader(ir); System.out.println("input x is :"); String s=in.readLine(); double x=Double.parseDouble(s); if (x==3.1415926) System.out.println("this number is π"); else if(x==2071828183) System.out.println("this number is e"); else System.out.println("neither π nor e "); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { e.printStackTrace(); } new Application1(); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?