命令行现实,望大神改进为图形化界面,不甚感激!源码如下:
import java.util.Scanner;
class Dianming
{
public static void main(String[] args)
{
while(true){
System.out.println("是否继续点名?输入1继续输入0退出");
Scanner sc = new Scanner(System.in);
int shuru = sc.nextInt();
if (shuru==0)
{
break;
}
String[] arr ={"聂晓冬","谢晓明","杜弦东","周明凡","张永超","林冲","陈新"
,"王庆","卢威","李训文","谢大根","贺维华","邵嘉威","符帮春","文巍","吴应桐"
,"周长青","王志强","赖佛来","张广","孙伟","黄振源","陆滔","陈德强","张泽鹏"
,"谢剑东","沈炎","龙泽锋","羊定志","刘超","孟伟","罗铖","魏文彬","黄鹏"
,"高超","曾强","潘悦","廖畅勇","徐文豪","张晓坤","刘高","唐海"
,"许佳园","彭波","曹健","戴莉华","罗英标","肖凯元","魏厚国","谭敦勇","胡银"
,"陆先俊","周志明","冷晓龙","张杰","陈虹睿","王庚","王云","张宏文"
,"邹青青","李彦东","覃千伦","张智聪","张琪","陆安","吴斌洋","黄章挺","李志"
,"陈思齐","李建军","黄正根","张健","林思齐","杨俊","徐亮","杨文君","陈圣安","史鹏科"};
int index = (int)(Math.random()*arr.length);
System.out.println("被点到的名字是"+arr[index]);
}
}
}
import java.util.Scanner;
class LoginGame
{
public static void main(String[] args)
{
String username ="admin";
String password ="admin";
|
|