引入awt包
import java.awt.*;
import java.awt.*;
解决方案 »
- 想在网页中实现图片的拖拽和整合用javascript可以实现么?
- Only SOAP 1.1 or SOAP 1.2 message are supported in the system
- 求助,关于在MyEclipse中修改开源源码的操作步骤!
- Hibernate 二级缓存 无法启动 跪求高手!
- struts1.x如何讲保存到数据库中的图片显示到页面?
- spring 入门级开发环境配置问题,谢谢!!
- 小第,最近学习spring MVC结构,可是执行不了,现分析如下,望指点迷津。多谢!
- intle和moto的手机开发大赛,小弟要组队参赛,有意向的,顶一顶啊!快!!!!!!!!
- 怎么在linux中检测tomcat是否还能提供正常服务?
- FastDFS文件服务器的问题 求大神
- 我使用log4j的时候怎么总是报找不到 log4j:ERROR Could not read configuration file [log4j.properties].啊?
- 求O'Reilly的《Java RMI》!
public class test{public static void main(String args[]){
Point p1=new Point();
Point p2=Point(p1);
Point p3=new Point(3,2);
System.out.println(p1.distance(p3));
}
}
class Point{
protected double x,y;
public Point(){
x=0;y=0;
}
public Point(double x,double y){
this.x=x;
this.y=y;
}
public double getX(){
return x;
}
public double getY(){
return y;
}
public void setX(double x){
this.x=x;
}
public void setY(double y){
this.y=y;
}
public Point(Point point){
this.x=point.getX();
this.y=point.getY();
}
public double distance(Point point){
double px=point.getX();
double py=point.getY();
double distance;
distance=Math.sqrt((x-px)*(x-px)+(y-py)*(y-py));
return distance;
}
}
H:\java\test.java:129: cannot find symbol
symbol : method Point(Point)
location: class test
p2=Point(p1);
^
这是怎么回事