A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
Joined: Jan 24, 2006
May 02, 2006 21:14:00
in my book they created a stack object like so..
Stack word = new Stack();
and they pushed and poped characters.
because the book didn't say that the Stack was a char Stack.
so you can push or pop any value in a stack?
and it doesn't matter?
so i could say
char A = a;
string = hello;
and i wouldn't get an error?
You down with OOP? Yeah you know me!
Joined: Jan 03, 2006
May 02, 2006 23:49:00
It shouldn't allow it, try and compile and run it.
Stack is not a stand alone data structure, it could be build on an array, linked list and in the case of Stack in the API it is built using Vector.
"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
Infix to postfix algorithm
Printing char actually prints an int?
Character Array question
How to assign a String as a char varable name
String to char.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014