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?



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 difference between Grid and Gridbaglayout?

0 Answers  


What does sprintf return?

0 Answers  


What is the implementation of destroy method in java. Is it native or java code?

0 Answers  


What about anonymous inner classes in java?

0 Answers  


Can java object be locked down for exclusive use by a given thread?

0 Answers  


what is recursion in java

0 Answers   Cap Gemini,


Explain throw keyword in java?

0 Answers  


What is meant by collection in java?

0 Answers  


What are Encapsulation, Polymorphism and Inheritance?

5 Answers  


What is the same as procedures?

0 Answers  


What are the steps involved to write rmi based programs?

0 Answers  


What is passing parameters in java?

0 Answers  


Categories