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...

without using arthematic operation ,how can you write the
logic for adding/substraction/multiplication?

Answer Posted / ashwinkumar

int a = 10;
int b = 5;
int sum = BigInteger.valueOf(a).add(BigInteger.valueOf(b)).intValue();
int sum1 = BigInteger.valueOf(a).subtract(BigInteger.valueOf(b)).intValue();
int sum2 = BigInteger.valueOf(a).multiply(BigInteger.valueOf(b)).intValue();

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is java 11 paid version?

932


I want to re-reach and use an object once it has been garbage collected. How it's possible?

971


What is singleton service?

916


What is the difference between Java1.4 and Java1.5

2264


Is java 9 released?

956


Is alive and join method in java?

1081


What does opcode mean?

1017


What is native code?

1038


What is the use of join method?

979


What are the two ways of implementing multi-threading in java?

1442


How do you do math powers in java?

1025


What is prefix of a string?

981


Can we restart a thread already started in java?

1060


What are the changes in java.io in java 8 ?

979


What is the difference between Array and Hash Table?

995