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 are measurable parameters?
What is an array in java?
What are the important features of Java 10 release?
What is scanner in java?
What does the ‘static’ keyword mean? Is it possible to override private or static method in java?
What are sets in java?
Write a program in java to establish a connection between client and server?
What is meant by interface?
How do you check if an arraylist is not empty?
Define max and min heap, also the search time of heap.
What is the buffer limit?
How do you check if a string contains only numeric digits?
What are the two ways in which thread can be created?
Explain the overview of UDP messaging.
Can set contain duplicates?