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 %02d?

0 Answers  


Define inheritance with reference to java.

0 Answers  


How is it possible in java programming for two string objects with identical values not to be equal under the == operator?

0 Answers  


How to stop a thread in java? Explain about sleep () method in a thread?

0 Answers  


What is java lang string?

0 Answers  


What is a boolean structure?

0 Answers  


Explain the selection sort algorithm and state its time complexity?

0 Answers   Flextronics,


what do you mean by marker interface in java?

0 Answers  


worst case complexities of Quick sort and Merge sort.

0 Answers   Amazon,


What is bom encoding?

0 Answers  


Write a program to calculate factorial in java?

0 Answers  


What are the two types of exceptions in java? Which are the differences between them?

0 Answers  


Categories