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
What do you understand by java virtual machine?
Is there any difference between nested classes and inner classes?
What do you mean by composition in java?
Explain list interface?
What do you mean by of string::valueof expression in java 8?
Can we make the abstract methods static in java?
Can this keyword be used to refer static members?
What is main in java?
what are different ways in which a thread can enter the waiting state? : Java thread
Java is Pass by Value or Pass by Reference?
What is the function of static in java?
What are the differences between heap and stack memory?
I want to store more than 10 objects in a remote server? Which methodology will follow?
What is immutable state?
I want to print “hello” even before main is executed. How will you acheive that?