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

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)
  • 방명록

JAVA (12)
Java Collections Framework

이번 포스팅에서는 Java collection 에 대해 알아보자. Java Collection Framework (JCF) Java 에서 collection 이란 데이터의 집합, 그룹을 의미한다. JCF 는 이러한 데이터, 자료구조인 collection 과 이를 구현하는 class 를 정의하는 interface 를 제공한다. Collection ◼ ArrayList Arraylist 는 List 인터페이스를 구현하며 Array 데이터 구조를 기반으로 한다. (배열이면서 List 성격을 가짐) 데이터의 저장순서가 유지되고 null 을 포함한 중복도 허용한다. 단방향 포인터 구조로 데이터의 순차적 접근에는 용이하나 용량을 변경할 경우 효율이 떨어진다. ◼ Vector ArrayList 와 거의 같지만 동기화..

JAVA 2019. 12. 23. 10:25
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
JAVA data type

데이터 타입 설명 길이 범위 boolean 논리값 1 bit true or false byte 부호 있는 정수 8 bit -128 ~ 127 char 유니코드 문자 16 bit \u0000 ~ \uFFFF short 부호 있는 정수 16 bit -32768 ~ 32767 int 부호 있는 정수 32 bit -2147483648 ~ 2147483647 long 부호 있는 정수 64 bit -9223372036854775808 ~ 9223372036854775807 float IEEE 754 실수 32 bit 1.40239846e-45f ~3.40282347e+38f double IEEE 754 실수 64 bit 4.94065645841246544e-324~1.79769313486231570e+308

JAVA 2019. 1. 30. 10:18
StringUtils (V ~ Z)

String wrap(String str, char wrapWith) 문자열에 지정한 글자(wrapChar) 로 감싸서 반환 StringUtils.wrap(null, *) = null StringUtils.wrap("", *) = "" StringUtils.wrap("ab", '\0') = "ab" StringUtils.wrap("ab", 'x') = "xabx" StringUtils.wrap("ab", '\'') = "'ab'" StringUtils.wrap("\"ab\"", '\"') = "\"\"ab\"\"" cs String wrap(String str, String wrapWith) 문자열에 지정한 문자열(wrapWith) 로 감싸서 반환 StringUtils.wrap(null, *) = nul..

JAVA 2018. 12. 21. 11:46
StringUtils (S ~ U)

String[] split(String str) 문자열의 공백을 기준으로 나눠 문자열 배열 반환 StringUtils.split(null) = null StringUtils.split("") = [] StringUtils.split("abc def") = ["abc", "def"] StringUtils.split("abc def") = ["abc", "def"] StringUtils.split(" abc ") = ["abc"] cs String[] split(String str, char separatorChar) 지정한 글자(separatorChar) 를 기준으로 나눠 문자열 배열 반환 StringUtils.split(null, *) = null StringUtils.split("", *) = [] S..

JAVA 2018. 12. 21. 11:45
StringUtils (P ~ R)

String prependIfMissing(String str, CharSequence prefix, CharSequence... prefixes) 문자열이 접두사(prefix, prefixes) 로 시작하지 않으면 접두사(prefix, prefixes) 추가 StringUtils.prependIfMissing(null, null) = null StringUtils.prependIfMissing("abc", null) = "abc" StringUtils.prependIfMissing("", "xyz") = "xyz" StringUtils.prependIfMissing("abc", "xyz") = "xyzabc" StringUtils.prependIfMissing("xyzabc", "xyz") = "xyz..

JAVA 2018. 12. 21. 11:45
StringUtils (M ~ O)

String mid(String str, int pos, int len) 지정한 위치(pos)에서 길이만큼(len) 문자열 반환 StringUtils.mid(null, *, *) = null StringUtils.mid(*, *, -ve) = "" StringUtils.mid("", 0, *) = "" StringUtils.mid("abc", 0, 2) = "ab" StringUtils.mid("abc", 0, 4) = "abc" StringUtils.mid("abc", 2, 4) = "c" StringUtils.mid("abc", 4, 2) = "" StringUtils.mid("abc", -2, 2) = "ab" cs String normalizeSpace(String str) trim 후 중간의 여..

JAVA 2018. 12. 21. 11:44
StringUtils (J ~ L)

String join(byte[] array, char separator) byte 배열을 구분자(separator) 로 join 하여 반환 StringUtils.join(new Byte[]{(byte)0xA, (byte)0x01, (byte)0x02}, '*') = "10*1*2" cs String join(byte[] array, char separator, int startIndex, int endIndex) byte 배열을 구분자(separator) 로 지정한 범위에(startIndex, endIndex) join 하여 반환 StringUtils.join(new Byte[]{(byte)0xA, (byte)0x01, (byte)0x02}, '*', 0, 3) = "10*1*2" StringUtils..

JAVA 2018. 12. 21. 11:43
StringUtils (G ~ I)

String getCommonPrefix(String... strs) 모든 문자열에서 공통으로 시작되는 문자열 반환 StringUtils.getCommonPrefix(null) = "" StringUtils.getCommonPrefix(new String[] {}) = "" StringUtils.getCommonPrefix(new String[] {"abc"}) = "abc" StringUtils.getCommonPrefix(new String[] {null, null}) = "" StringUtils.getCommonPrefix(new String[] {"", ""}) = "" StringUtils.getCommonPrefix(new String[] {"", null}) = "" StringUtils...

JAVA 2018. 12. 21. 11:43
StringUtils (D ~ F)

T defaultIfBlank(T str, T defaultStr) 문자열이 공백, "", null 일 경우 반환할 문자열(defaultStr) 반환 StringUtils.defaultIfBlank(null, "NULL") = "NULL" StringUtils.defaultIfBlank("", "NULL") = "NULL" StringUtils.defaultIfBlank(" ", "NULL") = "NULL" StringUtils.defaultIfBlank("bat", "NULL") = "bat" StringUtils.defaultIfBlank("", null) = null cs T defaultIfEmpty(T str, T defaultStr) 문자열이 "", null 일 경우 반환할 문자열(defau..

JAVA 2018. 12. 21. 11:33
이전 1 2 다음
이전 다음
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • 임이지의 블로그 - be the miracle!
TAG
  • 리워드앱
  • android intent
  • 앱테크 추천
  • StartService
  • onCreateContextMenu
  • 무료채굴
  • 안드로이드 서비스
  • task
  • bindservice
  • 무료 채굴
  • WEMIX
  • notifyDataSetChanged
  • p2e
  • M2E
  • task 생성
  • onContextItemSelected
  • Android Service
  • 안드로이드 인텐트
  • 리워드 어플
  • Intent
  • android activity flag
  • mPANDO
  • registerForContextMenu
  • 채굴앱
  • BroadcastReceiver
  • RoomDatabase
  • android flag activity
  • android task
  • StringUtils
  • 앱테크
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

티스토리툴바