note: sorry about the bad formatting, I'm new to stack overflow
If I had a piece of code that started like this,
import java.util.Scanner;
public class MyProgram
{
public static void main(String[] args)
{
Scanner Input = new Scanner (System.in);
System.out.println( "Write either yes or no." );
String message = Input.nextLine();
I am thinking about something like this:
if( message == "yes" )
By this, I mean checking what the user wrote when prompted to, which is stored as message.