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


Please Help Members By Posting Answers For Below Questions

Is c better than java?

546


What is static and final keyword in java?

577


Can a constructor have different name than a class name in java?

592


What is the statements?

591


What is the difference between import java.util.date and java .util?

569






What is the difference between an interface and an abstract class?

540


How to invoke external process in java.

566


What is e java?

557


What are different types of inner classes ?

558


What is jit compiler in java?

590


How many bits is a float?

542


What is local class in java?

520


Which is better 64 bit or 32 bit?

507


What happens if I remove static from main method?

524


What is bitwise complement?

502