JAVA编程思想
文章平均质量分 53
breezes2008
放弃也是一种美.
展开
-
创建栈
public class LinkedListStack { Node top=new Node(); private static class Node { U e; Node next; public Node(){this.e=null;this.next=null;} public Node(U e,Node next){ this.e=e;this.next=next;}原创 2009-06-08 15:59:00 · 658 阅读 · 0 评论 -
随机生成器示例
/* *该程序演示随机生成任意数量的演员 */import java.util.*;interface Generator { public T next();}class GuysMovie { //电影演员 private static long counter=0; private final long id=counter++; public String toString(){ re原创 2009-06-08 22:15:00 · 627 阅读 · 0 评论