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
What is a pattern what is an anti pattern?
How do you reverse a list?
How the interruptible method gets implemented?
What is the generic function?
What is nan in java?
Is math an abstract class in java?
What is the equal sign?
What is use of a abstract variable?
Why charat is used in java?
What are meta-annotations?
What is a ternary operator in java? What is an interface?
What is a byte string?
What is type safety in java?
What is continuity of a function?
What is the constructor?