Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > parameterized abstract data type using java 5.0

Reply
Thread Tools

parameterized abstract data type using java 5.0

 
 
leo@tech-trans.com
Guest
Posts: n/a
 
      06-29-2005
Hi!

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

Ming

 
Reply With Quote
 
 
 
 
Ingo R. Homann
Guest
Posts: n/a
 
      06-29-2005
Hi,

wrote:
> 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

 
Reply With Quote
 
 
 
 
leo@tech-trans.com
Guest
Posts: n/a
 
      06-29-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using "abstract" on a class with no abstract method Stefan Ram Java 27 08-17-2009 12:36 AM
About abstract class and abstract method Sameer Java 4 08-31-2005 12:59 AM
Deriving abstract class from non-abstract class Matthias Kaeppler Java 1 05-22-2005 01:28 PM
Abstract class with no abstract functions Uzytkownik C++ 3 04-03-2005 05:45 PM
Abstract Classes w/o abstract methods DaKoadMunky Java 4 04-20-2004 04:53 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57