티스토리 뷰
Object 형이 어떤 형인지 판별할때 사용.
객체가 특정 클래스나 인터페이스로부터 생성된 객체인지를 판별 해주는 연산자.
형식) 객체참조변수 instanceof Type
ex)
public class TestA {}
public class TestB extends TestA{}
public class TestC extneds TestB{}
각각 testA, testB, testC 로 객체 생성하였다 했을 시
testA instanceof testA > true
testA instanceof testB > false
testA instanceof testC > false
testB instanceof testA > true
testB instanceof testB > true
testB instanceof testC > false
testC instanceof testA > true
testC instanceof testB > true
testC instanceof testC > true
'프로그래밍' 카테고리의 다른 글
[ETC] Interface를 이용한 DI를 구성하는 이유 (0) | 2016.12.24 |
---|---|
[ETC] MSSQL 명령어 (0) | 2016.12.24 |
[JAVA] static, final (0) | 2016.12.24 |
[ETC] MSSQL - Sql Server Management Studio 단축키 (0) | 2016.12.24 |
[JAVA] Spring Annotation 설정 (0) | 2016.12.24 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Namibia
- 족발
- 빅토리아폴스
- 킹덤 호텔
- 칼라마
- 남미
- 볼리비아
- Oracle
- 마추피추
- 후마리
- 캄보디아
- 남미 저가항공
- 빈트후크
- 아구아스 칼리엔테스
- Uyuni
- 나미비아
- Cusco
- 토레스 델 파이네
- 푸에르토 나탈레스
- 쿠스코
- 우유니
- 햄버거
- 칠레
- 성계 투어
- aguas calientes
- 성스러운 계곡
- 애드센스
- Cambodia
- jQuery
- calama
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함