write a class to input 2 points by the user & check the line
maked by the points is horizontal,vertical or rectangle?
Answer Posted / murli
if (x1,y1) and (x2,y2) are two points..then line made is horizontal if (y1==y2).vertical if(x1==x2).Two points can never form a rectangle.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can we have multiple public classes in a java source file?
How is a variable stored in memory?
What is Classloader in Java?
How list contains works in java?
What is a method in programming?
What is the null?
What is %02d?
what is aggregation in java?
Difference between abstract and concrete class ?
Can a singleton class be inherited?
What are static variables and functions?
What causes memory leaks in java?
What is sorting in java?
Explain about assignment statement?
What is a buffer in java?