일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
31 |
Tags
- 자바 야구게임
- 전체텍스트
- 야구게임
- 가변인자
- 페이징
- 상속
- full text indexing
- Random
- 형변환
- 이클립스
- while
- Validations
- 단축키
- 다운캐스팅
- 상속예제
- Login with OAuth Authentication
- 전체
- IBatis procedure
- 전자정부
- 업캐스팅
- 다형성
- angular2
- 25가지 효율적인 sql작성법
- jquery
- 스프링
- 추상클래스
- Full text
- 로또
- 자바
Archives
- Today
- Total
목록for (1)
nalaolla
로또번호 생성기 - for문사용
package test.com; import java.util.Random; public class Lotto { public static void main(String[] args) { // TODO Auto-generated method stub int[] lot = new int[7]; int rdm_num; Random rdm = new Random(); for (int i = 0; i < lot.length; i++) { rdm_num = rdm.nextInt(45)+1; System.out.println(rdm_num); lot[i] = rdm_num; for (int j = 0; j < i; j++) { if(lot[j] == rdm_num) { System.out.println("중복에 의..
JAVA
2015. 11. 30. 22:53