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
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?
How is treeset implemented in java?
Can a class declared as private be accessed outside it’s package?
What is the format specifier?
Can substring create new object?
What are the data types supported by java?
What is a subsequence of a string?
Can array grow dynamically in java?
What initialize variables?
What is r * in math?
Where are register variables stored?
Should you use singleton pattern?
How many types of methods are there?
can java object be locked down for exclusive use by a given thread? : Java thread
How many wrapper classes are there in java?