April 05
Prof. Ismael H. F. Santos -
ismael@tecgraf.puc-rio.br
2
Fundamentos da Linguagem
n
Encadeamento de Construtores
n
n
class Point {
n
int x, y;
n
Point() {
n
this(0,0);
// <- Chama construtor com parametros
n
}
n
Point(int x, int y) {
n
this.x = x; this.y = y;
n
}
n
...
n
}