I'm new to Java and learning - so excuse the potentially silly question that this might be!
It's a simple Paper Rock Scissors game...
Using BlueJ I keep getting this error;
"incompatible types"
When running this code;
import comp102.*;
import java.util.Scanner;
public class RPS{
String paper = "paper";
String rock = "rock";
String scissors = "scissors";
public void playRound(){
String paper = "paper";
String rock = "rock";
String scissors = "scissors";
System.out.print ('\f'); // clears screen
Scanner currentUserSelection = new Scanner(System.in);
String enterText = null;
System.out.println("Make your Selection; Paper, Rock or Scissors: ");
enterText = currentUserSelection.next();
System.out.println("enterText = " + enterText);
if(enterText = paper){
System.out.println("the IF Stmt is working");
}
}
The error is referring to this line "if(enterText = paper){"
Many Thanks