if (userCoin.getCoinValue() == generatedCoins.get(1).getCoinValue())
{
System.out.println("match");
}
else
{
System.out.println("nope");
}
should work.
Forgot to add .equals will not work on a primitive type so calling.
if (userCoin.getCoinValue().equals(generatedCoins.get(1).getCoinValue()))
{
System.out.println("match");
}
else
{
System.out.println("nope");
}
will not work, hope this helps.
This post has been edited by floppyspace: 08 March 2013 - 09:43 PM

New Topic/Question
Reply





MultiQuote



|