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
Is java 11 paid version?
I want to re-reach and use an object once it has been garbage collected. How it's possible?
What is singleton service?
What is the difference between Java1.4 and Java1.5
Is java 9 released?
Is alive and join method in java?
What does opcode mean?
What is native code?
What is the use of join method?
What are the two ways of implementing multi-threading in java?
How do you do math powers in java?
What is prefix of a string?
Can we restart a thread already started in java?
What are the changes in java.io in java 8 ?
What is the difference between Array and Hash Table?