2008-03-11

FirstJavaProgram

关键字: firstjavaprogram
import java.io.*;
public class FirstJavaProgram {
static final int NUMBER=12;
static BufferedReader keyboard=new BufferedReader(new InputStreamReader(System.in) );

public static void main(String args[])throws IOException
{
	int firstNum;
	int secondNum;
	firstNum=18;
	System.out.println("Line 11:firstNum="+firstNum);
	System.out.print("Line 12:Enter an integer:");
	secondNum=Integer.parseInt(keyboard.readLine());
	System.out.println();
	System.out.println("Line 15:secondNum="+secondNum);
	firstNum=firstNum+NUMBER+2*secondNum;
	System.out.println("Line 17:The new value of"+"firstNum="+firstNum);
}
}
评论
chenchuxin 2008-03-11
static BufferedReader keyboard=new BufferedReader(new InputStreamReader(System.in) );  



secondNum=Integer.parseInt(keyboard.readLine());   
发表评论

提醒: 该博客已发表在公共论坛,博客所有留言会成为论坛回贴,留言请注意遵守论坛发贴规则

您还没有登录,请登录后发表评论

chenchuxin
搜索本博客
存档
最新评论