char 를 제외한 모든 자료형은 Unsigned 타입을 가질 수 없다.![[자료형별로 가지고 있는 특징들]](https://s3-us-west-2.amazonaws.com/secure.notion-static.com/bafbcaca-2fc9-420f-aeae-16c5529e0c2f/_-2.png)
[자료형별로 가지고 있는 특징들]
<aside>
💡 BigInteger
long자료형 보다 더 큰 정수형이 필요할 경우 사용하는 Reference Type 자료형으로 기본 자료형 처럼 연산자를 이용한 연산은 할 수 없다. 대신 BigInteger가 제공하는 사칙 연산 메소드인 .add(), .subtract(), .multiply(), .divide()를 이용해 간단한 연산을 할 수 있다.
</aside>
ClassType, InterfaceType, ArrayType으로 구분public final class String
implements java.io.Serializable, Comparable<String>, CharSequence,
Constable, ConstantDesc {
@Stable
private final byte[] value;
//////////////......<중략>......//////////////
private static final ObjectStreamField[] serialPersistentFields =
new ObjectStreamField[0];
public String() {
this.value = "".value;
this.coder = "".coder;
}
@HotSpotIntrinsicCandidate
public String(String original) {
this.value = original.value;
this.coder = original.coder;
this.hash = original.hash;
}
public String(char value[]) {
this(value, 0, value.length, null);
}
//////////////......<중략>......//////////////
}
"")로 묶어서 표현하는 문자열은 String객체로 인식하기 때문에 아래 코드의 string2와 같은 형식으로 String객체 생성이 가능하다.public class ReferenceType {
public static void main(String[] args){
// new를 사용하여 String 타입으로 객체 생성
String string1 = new String();
//큰따옴표("")로 묶어서 표현하는 문자열은 String객체로 인식
String string2 = "String Type";
}
}