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 a static class have a constructor?

1011


How many days will it take to learn java?

945


What are conditionals and its types?

1153


Is string a wrapper class?

1027


What is the purpose of tostring() method in java?

1167


Why is it called buffering?

1131


How to split arraylist elements in java?

1188


What is += mean in java?

1008


Which is better ascii or unicode?

1003


EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.

9217


Explain exception chaining in java?

1184


What happens if an exception is throws from an object's constructor?

1144


Explain about fail fast iterators in java?

1067


How do you override a method?

1029


How do you represent a space in regex java?

1018