Possible Duplicate:
How do I compare strings in Java?
I have this code its working fine in retreiving the value from the url, but its not recognizing that the string is "True" is the toString() what I need or something else?
try {
URL url = new URL("http://www.koolflashgames.com/test.php?id=1");
URLConnection yc = url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(yc
.getInputStream()));
inputLine = in.readLine();
inputLine = inputLine.toString();
if(inputLine == "True") {
logger.info(inputLine);
player.sendMessage("Thanks");
}else{
logger.info(inputLine);
player.sendMessage("HAHAHA");
}
in.close();
} catch (Exception e) {
e.printStackTrace();
}