A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
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
It is sorta covered in the
JavaRanch Style Guide
String to char.
Infix to postfix algorithm
How to assign a String as a char varable name
Printing char actually prints an int?
Character Array question
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014