Posts by Douracy Freire • 11 points
1 post
-
1
votes5
answers10429
viewsA: How to exchange the value of two variables in Java?
import java.util.Scanner; public class Troca { int a; int b; int aux; public int trocaA(){ this.aux = this.b; return this.aux; } public int trocaB(){ this.b = this.a; return this.a; } public void…