tsld090.htm

来自「an excellent java tutorial for the ones 」· HTM 代码 · 共 41 行

HTM
41
字号

<HTML>

<HEAD>
<META HTTP-EQUIV="Context-Type" CONTEXT="text/html;charset=windows-1252">
<meta name="GENERATOR" content="Microsoft Internet Assistant for PowerPoint 97">
 <TITLE>Reading String Input Example</TITLE> 
</HEAD>

<BODY     >

 <H1>Reading String Input Example</H1> 
 <P><UL>
<H2>import java.io.* ;
</H2>
<BR></UL><UL>
<H2>	public class CharInput {
</H2>
</UL><UL>
<H2>	     public static void main(String[] argv) {
</H2>
</UL><UL>
<H2>		String s;
</H2>
</UL><UL>
<H2>		InputStreamReader ir;
</H2>
</UL><UL>
<H2>		BufferedReader in;
</H2>
</UL><UL>
<H2>		ir = new InputStreamReader(System.in)
</H2>
</UL><UL>
<H2>		in = new BufferedReader(ir); // where does the try go ?
</H2>
</UL><UL>
<H2>		while ((s = in.readLine()) !=null) {
</H2>
</UL><UL>
<H2>			System.out.println(揈cho line:

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?