I think I finally got it:
public boolean single(int[] values)
{
if (values.length == 1)
{
Type: Posts; User: GalBenH
I think I finally got it:
public boolean single(int[] values)
{
if (values.length == 1)
{
Thanks all for your prompt help!
Kevin,
Regarding the existsOnce=true
Before getting into any loop I wanted to eliminate the scenario of having an Array of only 1 int, which by deafult need this...
So here's the assignment I was given:
Writing a method that receives an int array titled values.
the method has to return True, if throughout the array, there's an int that exists only once, or...