How do I return the - 1 to show in the main?
Type: Posts; User: camaleonx13
How do I return the - 1 to show in the main?
I'm trying to run this code to find the key in the array
If the element is not 5 it is supposed to return a -1
The code runs but doesn't return anything. What am I doing wrong?
public class...
I need to find elements from an array that are unique.
The program is supposed to identify the duplicate elements as they are being entered and not count them.
For example: if I enter 10 then 20...
Hello;
My code is supposed to validate each element of the array to ensure they are within the valid range (50-100).
I can't seem to pass them to the Method.
import java.util.Scanner;
...