The Artima Developer Community
Sponsored Link

Java Answers Forum
converting Object to int

1 reply on 1 page. Most recent reply: Oct 7, 2002 12:40 PM by Don Hill

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Kranthi Varala

Posts: 1
Nickname: novice
Registered: Oct, 2002

converting Object to int Posted: Oct 6, 2002 10:43 AM
Reply to this message Reply
Advertisement
I'm trying to popa stack and return the object as an integer. Integer.parseInt doesnt seem to work. Is there any other way?


Don Hill

Posts: 70
Nickname: ssswdon
Registered: Jul, 2002

Re: converting Object to int Posted: Oct 7, 2002 12:40 PM
Reply to this message Reply
If you are getting a object and that object was stored as a Object from a Integer then what you need is a cast

Integer iSomeValue = (Integer)stack.pop;


HTH


> I'm trying to popa stack and return the object as an
> integer. Integer.parseInt doesnt seem to work. Is
> there any other way?

Flat View: This topic has 1 reply on 1 page
Topic: Add bookmark doesn't work with IE6 but does with IE5 Previous Topic   Next Topic Topic: JRE 1.4.1 - Disappearing Cursor

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use