This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Servlets and the fly likes Super User Checking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Super User Checking" Watch "Super User Checking" New topic

Super User Checking

Naveen R R

Joined: May 04, 2001
Posts: 20
Could anyone help me with this? The error it gives: The operator named == is not defined for the argument type(s) java.lang.String, char
public void validateSecurity(String loginId, String progId, String funcId, OfficeUserBean user) throws NoAccessException, db.NoConnectionException, db.DBException {
try {
if (user.getSuperUser() == 'X') {
else {
Thank You,
Andrew Shafer
Ranch Hand

Joined: Jan 19, 2001
Posts: 338

The error tells you what is wrong. You are trying to compare a String with a char with ==, which is not defined.
Off the top of my head:

That should work.
.equals() is a method of java.lang.String

Naveen R R

Joined: May 04, 2001
Posts: 20
Thanks, Andrew. It works now.
wood burning stoves
subject: Super User Checking
jQuery in Action, 3rd edition