//: KeyBoard.java
import java.io.*;public class KeyBoard {
public static void main(String[] args) {
try {
// 1b. Reading standard input:
BufferedReader stdin =new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter a line:");
System.out.println("Here is you just input:" + stdin.readLine());
} catch(IOException e) { System.out.println("IO Exception"); }
}
} ///:~
import java.io.*;public class KeyBoard {
public static void main(String[] args) {
try {
// 1b. Reading standard input:
BufferedReader stdin =new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter a line:");
System.out.println("Here is you just input:" + stdin.readLine());
} catch(IOException e) { System.out.println("IO Exception"); }
}
} ///:~
解决方案 »
- MyEclipse 无法打开xml文件
- 小弟请教:Java在windows下如何将汉字输出到.txt?先谢了
- java如何实现动态更新properties属性文件
- 怎么把字符串“31/07/2004”变成日期类型的??
- 这里的this是什么意思?
- java初学者:我花了三个星期,把java编程死想看完了,下一步最好坐点什么?
- 请教:怎样修改JTree中每级节点前面的图标?
- 怎样用Java开发opentools 插件 急!分不够在加。。。。
- 有关byte[]?各位高手谢谢了!
- 如何更改JOptionPane中的字体??
- jbuilder中如何编程实现声卡发声
- java命令不能执行,而javac可以执行,真是奇怪
public class p14
{
public static void main(String[] args)
{
char c;
System.out.print("enter a letter:");
try{
c=(char)System.in.read();
}catch(IOException e){};
System.out.println("the letter is:" + c);
}
}