Pessoal, tudo bem?
Estou estudando a linguagem JAVA e ainda estou bem no comecinho. Muito bom ter achado esse fórum para compartilhar as dúvidas e aprender mais!
Vamos lá:
No exercício que estou fazendo ele cria a seguinte classe e seu respectivo método construtor:
public class Box2 {
int x1 = 0;
int y1 = 0;
int x2 = 0;
int y2 = 0;
Box2(int x1, int y1, int x2, int y2){
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
}
Até aí tudo bem. A minha dúvida é: por que this.x1 = x1; é diferente de x1=this.x1;?
Poderiam me ajudar a entender a diferença para o JAVA nessas informações?
Abraços a todos!
