🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #102

compare strings

#102
From: AKsteve
Date: Thu, 04 Mar 2004 07:27
17 lines
1352 bytes
I am trying to compare two strings.

If the username and password matches what I have stored then great... looks
like this:
if (user.equalsIgnoreCase("Steve") && password.equals("iscool"))

how do I check to see if it "does not equal" what I have stored.

In other words, how do I check to see if a string does not equal another
string. (Yeah, I know an if else statement could do it, but is there a
simpler way - like .notequals)

I want the program to check the username and password until it is entered
correctly. I am using do/while.
This is for a class assignment

Steve
Technical Details
Message-ID: <104dmijn8e95nfc@corp.supernews.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,1b8e7ee93b12f7f6,start
X-Google-Attributes: gid10d6db,public
X-Google-ArrivalTime: 2004-03-03 23:28:26 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: "AKsteve" <stevik@hotmail.com>
Newsgroups: aus.computers.java
Subject: compare strings
Date: Wed, 3 Mar 2004 22:27:14 -0900
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <104dmijn8e95nfc@corp.supernews.com>
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Complaints-To: abuse@supernews.com
Lines: 19