//import java.io.*;
import java.util.*;
class Point{
int x;
int y;
public Point( int x, int y ){
this.x = x;
this.y = y;
}
public void print(){
System.out.println( "" + x + " " + y );
}
}
public class Main{
public static void main( String [] args )throws Exception{
HashMap<Point, Integer> mymap = new HashMap<Point, Integer>();
mymap.clear();
Point [] test = new Point[10];
for( int i = 0; i < test.length; i++ ){
test[i] = new Point( 0, i * i - 10 * i + 25 );
mymap.put( test[i] , i );
}
for( int i = 0; i < test.length; i++ ){
System.out.println( mymap.get( test[i] ) );
}
}
}
posted on 2009-09-18 19:59
Huicpc217 阅读(355)
评论(0) 编辑 收藏 引用 所属分类:
JAVA 、
模板