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

Explain an intermediate language?

0 Answers  


What are the different http methods?

0 Answers  


How to create a base64 decoder in java8?

0 Answers  


when a servlet sends request for first time it uses the follwing methods a)init b)doget() c)dopost() d)service

4 Answers   Accenture,


Write a java program for binary search?

0 Answers  


What is bifunction in java?

0 Answers  


What are jee technologies?

0 Answers  


what is the difference between object and class

10 Answers   IBM,


In which language java is written?

0 Answers  


What happens if we don’t override run method ?

0 Answers  


What does business logic mean?

0 Answers  


What causes memory leak in java?

0 Answers  


Categories