Posts by Diogo Pereira • 5 points
2 posts
-
0
votes1
answer850
viewsQ: How to organize an array for odd numbers before even numbers?
I’m trying to make a program that organizes an array to put the odd numbers before the even numbers, this was my attempt, what I’m doing wrong. Code: System.out.print("Indique o número de elementos…
-
0
votes1
answer385
viewsQ: Swap the first and last element of an array by creating a new array
Why the value of Numbers[0] changes to 3 after executing the code line below? New_Numbers [0] = Numbers [Numbers.length - 1]; The complete code: public static void main(String[] args) {…