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

Why hashcode is used in java?

0 Answers  


What is the synonym of string?

0 Answers  


How can you eliminate duplicates?

2 Answers  


What java ide should I use?

0 Answers  


what is difference between colection and collections?

25 Answers   Amdocs, IBM, Infosys, Ipog Software, Polaris, Tech Mahindra,






Can abstract class have private constructor?

0 Answers  


How many bits are in a sentence?

0 Answers  


What is a private class in java?

0 Answers  


What is the purpose of encapsulation?

0 Answers  


What is classpath?

0 Answers  


What is http client in java?

0 Answers  


what is net based application and its types

1 Answers  


Categories