摘要:
代码: import java.util.*; public class Test { public static void main(String[] args) { int x,y; Scanner rd=new Scanner(System.in); System.out.println("请 阅读全文
摘要:
import java.io.*; public class Test { public static void main (String[] args) throws IOException { char ch; BufferedReader buf =new BufferedReader(new 阅读全文
摘要:
/**这是说明变量作用域的示例程序 * 程序的名字为 VarExample.java */ public class VarExample{ static int a1=10; //类变量,对整个类都有效 public static void display() { int a2=200; //方法 阅读全文
摘要:
public class MyTest { public static void main(String[] args) { int a=2; int b=6; int c=a+b; System.out.println("结果为"+c); } } 与C语言有些类似 上面的方式不太灵活,我们进行改进 阅读全文