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

Difference between string, string builder, and string buffer?

0 Answers  


Can an object be null?

0 Answers  


How many bytes is 255 characters?

0 Answers  


What are the advantages of java?

0 Answers  


Java is Pass by Value or Pass by Reference?

0 Answers   BirlaSoft,


What is a newline character in java?

0 Answers  


What is casting ?

2 Answers  


What is garbage collection? What is the process that is responsible for doing that in java?

0 Answers  


Where the CardLayout is used?

1 Answers  


Can we convert stringbuilder to string in java?

0 Answers  


Is integer passed by reference in java?

0 Answers  


What does singleton class mean?

0 Answers  


Categories