Posts by Daniel • 77 points
5 posts
-
0
votes2
answers103
viewsA: Code always falls on the same if
After I realized I wrote idadeInicial= idade; when it should be idade = idadeInicial; I ended up reversing without realizing, and breaking myself thinking that there was something wrong with us if.…
-
-1
votes2
answers103
viewsQ: Code always falls on the same if
Why the method souVelho() only returns the answer "You’re new." regardless of the typed age? What’s going wrong? public class Pessoa{ private int idade; public Pessoa(int idadeInicial) {…
-
2
votes1
answer276
viewsQ: Return array of integers except 0. How do I do?
The method takes two numbers per parameter, and returns one array with the odd numbers between these two numbers. public static int[] oddNumbers(int l, int r) { int odd[] = new int[r]; for(int i=0;…
-
0
votes2
answers54
viewsQ: What do I need to change in this method to work properly?
This method searches, by the Customer’s phone, the Reservations that are made in it. The Customer may have more than one reservation, but the method is only showing the first reservation registered…
-
1
votes2
answers86
viewsQ: What is wrong with this method?
I’m doing a method of adding Users, and just one thing isn’t working, the function that: "Adding friends with the same mobile number will not be allowed." Ai need to check the users already added,…