File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Little help please.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Little help please...." Watch "Little help please...." New topic
Author

Little help please....

Scott Batchelor
Greenhorn

Joined: Jul 07, 2003
Posts: 11
Here is what I am trying to do...
Integer cnt = new Integer(1);
Later on in the code I want to change the value of the Variable cnt.
I am doing this...but it isnt working.
cnt = session.getAttribute("count");
Telling me incompatible types...I am trying to cast the string to Integer but no matter what I do I still get an error.
Thanks in Advance.
SB
Sree Yemparala
Greenhorn

Joined: Jul 10, 2003
Posts: 6
Try the following:
Integer cnt = new Integer(1);
cnt = Integer.valueOf( session.getAttribute("count"));
I hope this helps
Good Luck,
SJ
Scott Batchelor
Greenhorn

Joined: Jul 07, 2003
Posts: 11
I tried that before I posted and I get this:
Method valueOf(java.lang.Object) not found in class java.lang.Integer at line 152
I am lost...
SB
Scott Batchelor
Greenhorn

Joined: Jul 07, 2003
Posts: 11
As usual I was trying to make it to hard.
cnt = (Integer)session.getAttribute("count");
This works.
Thanks.
SB
Sree Yemparala
Greenhorn

Joined: Jul 10, 2003
Posts: 6
Is it possible for you to post your code from the beginning to line 153.
Thanks,
sj
Sree Yemparala
Greenhorn

Joined: Jul 10, 2003
Posts: 6

Well, Ignore my previous reply then..
Bye..SJ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Little help please....