This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hi, Just checking out the possiblity if its possible? Seetesh
Joined: Feb 13, 2004
Hi, I was trying something like this String language = "english"; String country = "english"; int a = 100; int b= 100; Stack astack = new Stack(); astack.push(language); Stacks dont seem to take in int values. Any clues. Seetesh
No, they only hold Objects. In order to push ints or other built-in types onto a stack, you need to use the wrapper classes such as Integer. You should learn as much as you can about the wrapper classes. They are used quite frequently. I'm sure you can search the board for previous discussions about them. Layne