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

The world of Parkho

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

The world of Parkho

검색하기 폼
  • 분류 전체보기 (256)
    • Android (43)
      • BroadcastReceiver (5)
      • Database (12)
      • Intent (6)
      • Service (5)
      • Task (15)
      • Troubleshooting (17)
      • UI (58)
    • JAVA (12)
    • Lambda Expressions in Java (0)
    • VCS (1)
    • App Tech (76)
      • P2E (28)
    • Etc (6)
  • 방명록

Min (1)
Math 반올림, 올림, 내림 등 주요 메소드 정리

개발을 하다보면 float, double 형 변수에 반올림, 올림, 내림 등의 처리가 필요한 경우가 종종 생긴다. 이번 포스팅에서는 요런 역할을 해주는 Math class 를 소개한다. 반올림 Math.round 전달된 실수의 소수점 첫번째 자리를 반올림하여 정수로 리턴 ◼ Code 1 2 double number = 9.5; System.out.println("Math.round = " + Math.round(number)); ◼ Result Math.round = 1 내림 Math.floor 전달된 실수의 소수 부분을 무조건 버림 ◼ Code 1 2 double number = 9.5; System.out.println("Math.floor = " + Math.floor(number)); ◼ Resu..

JAVA 2019. 6. 20. 09:29
이전 1 다음
이전 다음
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • 임이지의 블로그 - be the miracle!
TAG
  • onContextItemSelected
  • 채굴앱
  • 앱테크
  • p2e
  • android task
  • BroadcastReceiver
  • android flag activity
  • M2E
  • onCreateContextMenu
  • registerForContextMenu
  • Intent
  • 리워드앱
  • 무료 채굴
  • WEMIX
  • 앱테크 추천
  • StartService
  • bindservice
  • 안드로이드 인텐트
  • 안드로이드 서비스
  • RoomDatabase
  • mPANDO
  • android activity flag
  • android intent
  • 무료채굴
  • Android Service
  • StringUtils
  • notifyDataSetChanged
  • task
  • 리워드 어플
  • task 생성
more
«   2025/05   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바