Fortune Telling Collection - Comprehensive fortune-telling - JAVA topic, seek solution, seek code! ! ! !
JAVA topic, seek solution, seek code! ! ! !
Public? Class? Point? {
Private? Double? x,? y;
Public? Point (double? x,? Double? y){
This. x? =? x;
This. y? =? y;
}
Public? Double? Distance (point? p){
Return? Math.sqrt((p.x? -? x)? *? (p.x? -? x)? +? (p.y? -? y)? *? (p.y? -? y));
}
Public? String? toString(){
Return? "("? +? x? +",?" +? y? +")";
}
/**
? *? @param? A parameter name
? */
Public? Static electricity Invalid? main(String[]? args)? {
//? Todo? Automatically generated? Method? cigarette end
Point? p 1? =? New? Point (3,? 4);
Point? p2? =? New? Point (5,? 6);
System.out.println("The? Distance? Between? Point? ”? +? p 1? +? "? then what ”+? p2? +? "? Is it? ”? +? P 1. distance (p2)? +? ".");
}
}
- Previous article:Dream of driving into a ditch.
- Next article:Free name horoscope fortune telling _ free name horoscope fortune telling free fortune telling
- Related articles
- Buddhist fortune-telling novels _ Read Buddhist fortune-telling novels for free
- One of the nine incense sticks is taller than the other. Why is it lowest outside?
- Fortune-telling 20 16 rat _2020 rat fortune-telling
- Hong Kong Opera from TVB 20/KOOC-0/0 to 20/KOOC-0/3.
- The Story Analysis Video of Fortune Telling _ The True Story of Fortune Telling
- What does the name Lin Ziyue mean? Find a solution
- A woman's weakness is often a good life. When can a rich official marry well?
- Xuyi Tieshan Wealth _ Xuyi Tieshan Temple Ticket Price
- I have a stupid mother.
- What is my life? Lunar calendar 1964, around noon on the third day of May.