java for loop choice
来源:互联网 发布:中国网络行政学院 编辑:程序博客网 时间:2024/05/16 19:33
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class RunTest {
public static void main(String[] args) throws IOException {
while(true){
System.out.println("There are three choice :1 2 3");
System.out.println("Please Enter your choice:");
BufferedReader br = new BufferedReader(new InputStreamReader(
System.in));
String name = br.readLine();
if( "1".equals(name)){
System.out.println("Your choice is 1");
}
if ("2".equals(name))
{
System.out.println("Your choice is 2");
}
if ("3".equals(name))
{
System.out.println("Your choice is 3");
}
}
}
}
import java.io.IOException;
import java.io.InputStreamReader;
public class RunTest {
public static void main(String[] args) throws IOException {
while(true){
System.out.println("There are three choice :1 2 3");
System.out.println("Please Enter your choice:");
BufferedReader br = new BufferedReader(new InputStreamReader(
System.in));
String name = br.readLine();
if( "1".equals(name)){
System.out.println("Your choice is 1");
}
if ("2".equals(name))
{
System.out.println("Your choice is 2");
}
if ("3".equals(name))
{
System.out.println("Your choice is 3");
}
}
}
}
- java for loop choice
- Java for loop syntax: java for(:)
- java.awt.Choice类
- java.awt.Choice类
- CHOICE
- Choice
- choice
- Oracle/PLSQL: FOR Loop
- For loop in MakeFile
- Advanced for loop
- for loop循环
- Bash For Loop Examples
- oracle for in loop
- for&while loop/shell
- linux shell----for Loop
- FOR LOOP语句写法
- range-based for() loop
- Bash For Loop Examples
- 使用ffmpeg遇到的问题
- 不得不看的两次从C++回归C的高手评论C++
- HDU-1263 模拟
- Linux之父炮轰C++:糟糕程序员的垃圾语言
- 1.asm-80386汇编
- java for loop choice
- 2012微软暑期实习笔试
- Career Cup1-2
- ASIHttpRequest组件添加
- 2012腾讯暑期实习笔试
- fatal error C1010: unexpected end of file while looking for precompiled head
- USACO Training Section 1.3 Greedy Algorithm 贪心算法
- Adobe笔试面试经验
- java连接SQL server2005数据库