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

취미코딩

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

취미코딩

검색하기 폼
  • 분류 전체보기 (101)
    • Kotlin (25)
    • JAVA (25)
    • HTML, CSS (13)
    • Javascript, jQuery (10)
    • Linux (2)
    • Windows (3)
    • MAC (16)
    • IT (7)
  • 방명록

random (1)
(JAVA) 자바 Math, Random 클래스 알아보기

Math 클래스는 모두 static이라 바로 클래스로 사용이 가능함. public class zzzzz { public static void main(String[] args) { //절대값 결과:1 Math.abs(-1); //올림값 결과:1 Math.ceil(0.1); //버림값 결과:0 Math.floor(0.9); //최대값 결과:9 Math.max(1,9); //최소값 결과:1 Math.min(1,9); //랜던값 결과:0.0

JAVA 2017. 2. 12. 04:39
이전 1 다음
이전 다음
최근에 올라온 글
최근에 달린 댓글

Blog is powered by Tistory / Designed by Tistory

티스토리툴바