Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Can we have multiple public classes in a java source file?

1095


How is a variable stored in memory?

932


What is Classloader in Java?

1128


How list contains works in java?

921


What is a method in programming?

1121


What is the null?

949


What is %02d?

1034


what is aggregation in java?

941


Difference between abstract and concrete class ?

1072


Can a singleton class be inherited?

906


What are static variables and functions?

1056


What causes memory leaks in java?

869


What is sorting in java?

928


Explain about assignment statement?

973


What is a buffer in java?

970