Java-7강
December 31st, 2009
Comments off
this()
같은 클래스 내에 생성자를 호출
생성자가 생성자로 redirect
- this()는 생성자 내에서 첫 줄에 와야한다. 어떤 문장도 this() 앞에 와서는 안된다. (예외는 주석)
- 일반 method에서는 호출할 수 없다.
성적관리프로그램
클래스를 파일로 나누기
- Student
- Input
- Output
- Main
- Calc
- Sort
Java.io.File
Constructor summary에
File(String pathname)
- Java에서 String parsing 방법 3가지
- String class 의 split()를 이용하자
- java.util.String Tokenizer class를 이용하자
- java.util.Scanner class를 이용하자
1. split()
split은 기준(콤마, 스페이스 등등..)으로 나눈다.
기준은 정규식을 사용한다.
space = “\\s”
“\\s+” +가 붙은 것은 스페이스 한칸 이상을 뜻
변수는 가급적 private 메소드는 필요에 따라 private
소멸자
java.lang.Object
finalize
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
A subclass overrides the finalize method to dispose of system resources or to perform other cleanup.
상속
Blog
1997년 ~ 2002년 이전의 정보처리기사 기출문제
중 택 1
Java로 프로그래밍
http://archchez.tistory.com/728
Categories: Java, bitacademy





![Validate my RSS feed [Valid RSS]](http://jongsunkim.pe.kr/img/valid-rss.png)
