Sol said:You want to do something like line.equals("DOG");
DilLw33D said:can i compare two strings like so:
String line = "DOG";
if(line == "DOG);
//do some shit
is that valid or do i need to do something else?
yubyub said:You cant use == because you're comparing strings, an int or double however, would work just fine. Java can't compare strings unless you are using specific string functions.