论坛首页 入门技术论坛

FirstJavaProgram

浏览 1448 次
精华帖 (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);
}
}
   发表时间:2008-03-11  
static BufferedReader keyboard=new BufferedReader(new InputStreamReader(System.in) );  



secondNum=Integer.parseInt(keyboard.readLine());   
0 请登录后投票
论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics