본문 바로가기 메뉴 바로가기

devbible

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

devbible

검색하기 폼
  • 전체보기 (356)
    • Tips (44)
    • News (32)
    • Event (10)
    • Travel (0)
    • Review (2)
    • Development (266)
    • etc (1)
  • 방명록

randomstring (1)
[Java] 랜덤 문자열 (Random String) 만들기

랜덤 문자열을 생성하고자 한다. 직접 구현해도 되지만 이미 구현되어있는 라이브러리를 쓰는게 편하다. Apache Commons Lang 을 사용하면된다. 아래 링크로 들어가서 다운받거나 http://commons.apache.org/proper/commons-lang/download_lang.cgi Maven으로 받으면된다org.apache.commons commons-lang3 3.4 아래 코드를 실행해보자System.out.println("Default [" + RandomStringUtils.random(10) + "]"); System.out.println("CustomChar [" + RandomStringUtils.random(10, new char[]{'A','B','C'}) + "]"); ..

Development 2015. 7. 22. 12:25
이전 1 다음
이전 다음
최근에 올라온 글
글 보관함
Total
Today
Yesterday
TAG
  • 게임쿠폰
  • dpi
  • vcamp140.dll
  • CentOS
  • VisualStudio
  • dotnet
  • vcruntime140.dll
  • ListView
  • 티스토리 초대장
  • WSL
  • Java
  • MSSQL
  • android
  • vcomp140.dll
  • SharedPreferences
  • Eclipse
  • ubuntu
  • MySQL
  • 쿠폰
  • 게임
  • Linux
  • KitKat
  • svn
  • 이벤트
  • Shell
  • JavaScript
  • Collections
  • Spring
  • Visual Studio 2015
  • redis
more

Blog is powered by Tistory / Designed by Tistory

티스토리툴바