0 LIKES LikeUnLike
I'm trying to do an if-then-else statement that does something according to whether a y or n was inputted. What am I doing wrong?if(keyboard.nextChar()='y' || keyboard.nextChar()='Y' ){ System.out.println("What is the amount charged? "); amountCharged = keyboard.nextFloat();}
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 2 answers.