일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 하이퍼레저패브릭
- #성적관리프로그램
- mac terminal command
- #1차원배열
- #binary
- 토큰경제
- border-box
- html plug-in
- #android activity
- #3차원배열
- #C++ has~a
- html object
- html charset
- html code
- relative path
- html multimedia
- #다차원포인터
- #CallByAddress
- html id
- git flow
- hyperledger transaction
- html video
- docker example
- #자바상속#자바이즈어#is~a
- html youtube
- html5 new tag
- #JAVASCRIPT
- #bubbleSort
- #2차원배열
- #C++ 연산자함수오버로딩
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