728x90 SMALL JAVA/Practice3 중첩반복문 빠져나가기 public void personinput() { exit: while(true) { String answer; System.out.println(" "); System.out.print("고객정보 입력 : "); name = in.next(); for (int i = 0; i < p.length; i++) { if (!name.equals(p[i].getpName())) { videoinput(); } else if (name.equals(p[i].getpName())) { System.out.println("연체된 비디오 이름 : " + p[i].getPvName()); System.out.println("연체금 : " + p[i].getpMoney()); System.out.println(" ");.. 2020. 10. 30. Hashmap이용해 단어쌍의 저장검색 package sample2; import java.util.HashMap; import java.util.Scanner; public class Sample1 { public static void main(String[] args) { HashMap dic = new HashMap(); Scanner in = new Scanner(System.in); dic.put("baby", "아기"); dic.put("love", "사랑"); dic.put("apple", "사과"); while(true) { System.out.println("찾고싶은 단어는? "); String eng = in.next(); if (eng.equals("exit")) { System.out.println("종료"); break.. 2020. 10. 30. arraylist활용한 회원가입 Login 클래스 import java.util.ArrayList; import java.util.Scanner; public class Login {//회원가입 public static void main(String[] args) { Scanner in = new Scanner(System.in); ArrayList join = new ArrayList() ; Join jo = new Join(); String memid, mempw, mempw2; join.add(jo); System.out.println("1.기존회원"); System.out.println("2.회원가입"); System.out.print("아이디를 입력하세요 : "); memid = in.next(); jo.setId(memid).. 2020. 10. 26. 이전 1 다음 728x90 LIST