write a class to input 2 points by the user & check the line
maked by the points is horizontal,vertical or rectangle?



write a class to input 2 points by the user & check the line maked by the points is horizontal,..

Answer / 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

More Core Java Interview Questions

What is the use of runnable interface?

0 Answers  


can anyone explain me the concept of autoboxing?

3 Answers  


How does linkedlist work in java?

0 Answers  


How do you do a line break in java?

0 Answers  


Is arraylist zero based?

0 Answers  






What is the collections api?

0 Answers  


Why do we need autoboxing in java?

0 Answers  


What is the final class modifier?

0 Answers  


What are different type of access modifiers?

3 Answers  


What is meant by javabeans?

0 Answers  


Does unicode support all languages?

0 Answers  


What is keyword in oop?

0 Answers  


Categories