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

How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?

1100


How is treeset implemented in java?

1033


Can a class declared as private be accessed outside it’s package?

1018


What is the format specifier?

950


Can substring create new object?

1130


What are the data types supported by java?

1031


What is a subsequence of a string?

1072


Can array grow dynamically in java?

990


What initialize variables?

1035


What is r * in math?

1003


Where are register variables stored?

1022


Should you use singleton pattern?

942


How many types of methods are there?

1064


can java object be locked down for exclusive use by a given thread? : Java thread

1108


How many wrapper classes are there in java?

1020