File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: String Comparison ?
strreams 4 massive file?
how to read integers from keyboard?
about this array class
Conditions on field
problem with try catch
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014