쉬프트연산자 >>, >>> 차이점이요.
양의 숫자를 쉬프트 시킬때는 차의가 없습니다.
하지만 음의 숫자는 2진수로 표시할때 맨앞에 부호비트 1이 붙습니다.
>>연산자의 경우는 부호비트는 고정되고 쉬프트 되지만
>>>연산자는 부호비트도 함께 쉬프트가 됩니다.
ex)
System.out.println(-300>>>2);
System.out.println(-300>>2);
실행시키면
1073741749
-75
가 됩니다.
UPBIT is a South Korean company, and people died of suicide cause of coin. The company helps the people who control the market price manipu...
댓글 없음:
댓글 쓰기
국정원의 댓글 공작을 지탄합니다.