A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
String Comparison ?
Joined: Dec 27, 2005
Jan 31, 2006 09:14:00
Can someonew tellme how to go about srting comparison.
I have the input from the System as b.readLine() and I want to compareit with
if i write
// My code goes here
even after typing Exit it does not enter the IF Loop...........
author and iconoclast
Joined: Jul 08, 2003
Jan 31, 2006 09:32:00
Don't use "==" to compare Strings; use the "equals()" method.
if (myString.equals("Exit")) ...
"==" asks if two objects are the same physical object in memory, while "equals()" asks if they are interchangeable or equivalent, even if they are distinct objects.
[Jess in Action]
Joined: Dec 14, 2004
Jan 31, 2006 11:45:00
Welcome to the real world of
Money for nothing and Java for Free
I agree. Here's the link:
subject: String Comparison ?
Conditions on field
strreams 4 massive file?
about this array class
problem with try catch
how to read integers from keyboard?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014