Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

parameterized abstract data type using java 5.0

Thread view: 
leo@tech-trans.com - 29 Jun 2005 10:10 GMT
Hi!

 How to use new feature (parameterized abstract data type) in JAVA 5.0
to write a stack?

Ming
Ingo R. Homann - 29 Jun 2005 14:24 GMT
Hi,

> Hi!
>
>   How to use new feature (parameterized abstract data type) in JAVA 5.0
> to write a stack?
>
> Ming

import java.util.Stack;

...
Stack<String> s=new Stack<String>();
s.push("Test");
String string=s.pop();

...or what exactly is your question?

Ciao,
Ingo
leo@tech-trans.com - 29 Jun 2005 14:57 GMT
I want a generic buffer in Java which operates as stack can able to
store at most 10 items of the same type (e.g. string).  Thx!

Ming


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.