Java Native

Primitive

  • Primitive?
    • 원시 자료형이란 뜻으로 과학에서 프로그래밍 언어가 제공하는 자료형 중 하나. 내장형 혹은 기본형으로도 불림
    • wiki
  • Java Primitive Type
    • byte, char, short, int, long, float, double, boolean

int casting

FROM TO METHOD EX.
int byte -  
int char char c = (char) int;  
int short -  
int long long l = int;
Long l = new Long(int);
Long l = Long.valueOf(int);
 
int float -  
int double double d = int;
Double d = new Double(int );
Double d = Double.valueOf(int);
 
int boolean -  
int string String s = String.valueOf(int);
String s = Integer.toString(int);
 

long casting

FROM TO METHOD EX.
long byte -  
long char -  
long short -  
long int int i = (int) long;
int i = wrapperLong.intValue();
 
long float -  
long double -  
long boolean -  
long string String s = String.valueOf(long);
String s = Long.toString(long);
 

float casting

FROM TO METHOD EX.
float byte -  
float char -  
float short -  
float int -  
float long -  
float double -  
float boolean -  
float string -  

double casting

FROM TO METHOD EX.
double byte -  
double char -  
double short -  
double int -  
double long -  
double float -  
double boolean -  
double string -  

boolean casting

FROM TO METHOD EX.
boolean byte -  
boolean char -  
boolean short -  
boolean int -  
boolean long -  
boolean float -  
boolean long -  
boolean string -  

String

StringPool

StringBuilder & StringBuffer

StringTokenizer

Enum

Object

Objects

Math

Math & Random

Date

Date & Calendar & Timestamp & UTC

Format

Regex

정규식(Regular Expression)