일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 페이징
- 이클립스
- 야구게임
- 전자정부
- 가변인자
- 단축키
- Login with OAuth Authentication
- 25가지 효율적인 sql작성법
- while
- jquery
- 전체텍스트
- 로또
- 자바
- 상속
- Random
- 상속예제
- 업캐스팅
- 자바 야구게임
- 다운캐스팅
- full text indexing
- Full text
- 전체
- 추상클래스
- angular2
- 스프링
- 형변환
- 다형성
- IBatis procedure
- Validations
Archives
- Today
- Total
목록while (1)
nalaolla
로또번호 생성기 - while문 사용
import java.util.Random; public class Lotto_while { public static void main(String[] args) { // TODO Auto-generated method stub int[] lot = new int[7]; Random rdm = new Random(); for (int i = 0; i < lot.length; i++) { int rdm_num = rdm.nextInt(45) + 1; lot[i] = rdm_num; boolean exist = true; wh: while (exist) { for (int j = 0; j < i; j++) { if (lot[j] == rdm_num) { exist = false; System.out.prin..
JAVA
2015. 12. 1. 00:00