aspose file tools*
The moose likes Beginning Java and the fly likes What's wrong with this line? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What Watch "What New topic
Author

What's wrong with this line?

Anthony Smith
Ranch Hand

Joined: Sep 10, 2001
Posts: 285
int count = Integer.parseInt(data.getSession().getAttribute(username));

username is a String
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Hello,
username might be a String, but does data.getSession().getAttribute(String) return a String?
Good Luck,
-Dirk Schreckmann


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
Is username made up of all numbers. You are trying to parse a username into an int called count.
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4462
    
    6

I think he posted what he actually meant in this thread: http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=33&t=004853
Junilu
 
Consider Paul's rocket mass heater.
 
subject: What's wrong with this line?