티스토리 뷰
반응형
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
- 나미비아
- MariaDB
- jQuery
- aguas calientes
- 성스러운 계곡
- mysql
- 우유니
- 캄보디아
- 족발
- 마추피추
- 햄버거
- Namibia
- vue3
- 아구아스 칼리엔테스
- 킹덤 호텔
- 성계 투어
- 남미
- Cambodia
- 애드센스
- 빅토리아폴스
- Oracle
- calama
- Cusco
- 볼리비아
- 쿠스코
- 토레스 델 파이네
- 칠레
- 칼라마
- Uyuni
- 빈트후크
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함
반응형