application1.java~6~
来自「提供了常用的JAVA技术的示例」· JAVA~6~ 代码 · 共 44 行
JAVA~6~
44 行
package signfunction;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(); int x=Integer.parseInt(s); int y; if (x<0) { y=-1; System.out.println("y="+y); } else if (x==0) { y=0; System.out.println("y="+y); } else { y=1; System.out.println("y="+y); } try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { e.printStackTrace(); } new Application1(); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?