五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

[代碼展示]登錄

2019-12-03 18:04 作者:kands-code  | 我要投稿

還請(qǐng)各位幫忙看看,修改一下

注:這不能生成一個(gè)登錄界面,而是一個(gè)思路


import java.util.*;

public class NjavaT01 {
??? public static void greeting(String name) {
??????? System.out.println("Hello, "+name+" ! Welcome to CoLand.");
??? }
??? static Map<String,String> userStorage = new HashMap<>();
??? public static void main(String []args) {
??????? MAINLOOP:while(true){
??????????? Scanner sc = new Scanner(System.in);
??????????? System.out.println("Please enter your order(number): ");
??????????? System.out.println("1. login.");
??????????? System.out.println("2. register.");
??????????? int order = sc.nextInt();
??????????? if(order == 1) {
??????????????? System.out.println("Please enter your nameL: ");
??????????????? String usernameL = sc.next();
??????????????? if(userStorage.containsKey(usernameL)) {
??????????????????? for(int i = 3;i >= 0;i--) {
??????????????????????? System.out.println("Please enter you passwordL: ");
??????????????????????? String passwordL = sc.next();
??????????????????????? if(passwordL.equals(userStorage.get(usernameL))) {
??????????????????????????? greeting(usernameL);
??????????????????????????? break MAINLOOP;
??????????????????????? } else {
??????????????????????????? System.out.println("Your password is wrong.");
??????????????????????????? System.out.println("Please try again !");
??????????????????????? }
??????????????????? }
??????????????? } else {
??????????????????? System.out.println("Your name is not exist.");
??????????????????? System.out.println("Please try again or to regist");
??????????????? }
??????????? } else if(order == 2) {
??????????????? System.out.println("Please enter your nameR: ");
??????????????? String usernameR = sc.next();
??????????????? System.out.println("Please enter your passwordL:");
??????????????? String passwordR = sc.next();
??????????????? LOOP:for(int i = 3;i >= 0;i--) {
??????????????????? System.out.println("Please enter your password again:");
??????????????????? String passwordRR = sc.next();
??????????????????? if(passwordR.equals(passwordRR)) {
??????????????????????? userStorage.put(usernameR,passwordR);
??????????????????????? System.out.println("You have successfully regist");
??????????????????????? break LOOP;
??????????????????? }else {
??????????????????????? System.out.println("Your passwords can not match.");
??????????????????? }
??????????????? }
??????????? } else {
??????????????? System.out.println("Your order is wrong !");
??????????? }
??????? }
??? }
}


[代碼展示]登錄的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
墨竹工卡县| 乳山市| 柳州市| 休宁县| 井冈山市| 图木舒克市| 固始县| 万年县| 大城县| 东方市| 武清区| 湟中县| 西宁市| 金山区| 徐水县| 红桥区| 广西| 安国市| 石楼县| 昌吉市| 阿坝县| 温州市| 南召县| 镶黄旗| 赤壁市| 垣曲县| 天门市| 阜新市| 阳东县| 屯门区| 长葛市| 湖口县| 邹平县| 清水县| 桦甸市| 荥阳市| 黔南| 蒙山县| 棋牌| 镇赉县| 修武县|