일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- #C++ has~a
- html5 new tag
- #android activity
- html multimedia
- html plug-in
- git flow
- 하이퍼레저패브릭
- #자바상속#자바이즈어#is~a
- html code
- #binary
- #2차원배열
- #3차원배열
- mac terminal command
- #성적관리프로그램
- docker example
- html youtube
- #다차원포인터
- 토큰경제
- #bubbleSort
- border-box
- html object
- #CallByAddress
- html video
- html id
- hyperledger transaction
- #C++ 연산자함수오버로딩
- html charset
- relative path
- #JAVASCRIPT
- #1차원배열
Archives
- Today
- Total
목록#자바참조 (1)
A sentimental robot
객체참조
class Apple { int count; } public class Day3 { public static void main(String[] args) { Apple a1 = new Apple(); Apple a2; a1.count = 100; a2 = a1; // a1를 참초한다. a2는 a1의 메모리를 공유할 수 있다. 하지만 객체는 1개밖에 없는 것 System.out.println(a2.count); a2.count = 200; System.out.println(a1.count); a1 = null; // 이제 a1이란 이름으로는 사용 못하지만 a2로 사용가능 System.out.println(a2.count); } } class Apple { } public class Day3 { public..
Java
2018. 1. 9. 11:44