首页>代码>java LIST用法实例>/c15/ArrayListDemo/Chart.java
//==============================================================
// Chart.java - Sample data object for container demonstrations
//
// Java学习源代码检索系统 Ver 1.0 20031015 免费正式版
// 版权所有: 中国IT认证实验室(www.ChinaITLab.com)
// 程序制作: ChinaITLab网校教研中心
// 主页地址: www.ChinaITLab.com    中国IT认证实验室
// 论坛地址: bbs.chinaitlab.com  
// 电子邮件: Java@ChinaITLab.com
//==============================================================

public class Chart implements Comparable {
 public int number;
 public String name;
 public long scale;
 public Chart(int number, String name, long scale) {
  this.number = number;
  this.name = name;
  this.scale = scale;
 }
 public int compareTo(Object o) {
  Chart other = (Chart)o;
  return name.compareTo(other.name);
 }
 public String toString() {
  return number + "  " + name + "  1:" + scale;
 }
}
最近下载更多
zhaoyuzhang1991  LV10 2016年4月6日
AXIN  LV36 2014年2月25日
最近浏览更多
udryhefb 2023年6月12日
暂无贡献等级
heqian  LV16 2022年12月5日
ewan007  LV29 2022年7月8日
liuwenlong  LV20 2019年12月19日
xp95323  LV14 2019年11月30日
只要有你  LV8 2019年10月3日
dongzhan  LV12 2019年3月11日
fly666  LV11 2018年9月27日
agaciki123  LV12 2018年9月19日
xp9522  LV9 2018年8月13日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友