浏览 1448 次
锁定老帖子 主题:FirstJavaProgram
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2008-03-11
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); } } 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2008-03-11
static BufferedReader keyboard=new BufferedReader(new InputStreamReader(System.in) ); secondNum=Integer.parseInt(keyboard.readLine()); |
|
返回顶楼 | |