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 would you dynamically allocate memory to an array?
Which package is imported by default?
How do you create a bulleted list?
What is the use of keywords in java?
Is array an object in java?
What is the difference between the font and fontmetrics classes in java programming?
Why synchronization is important?
Can we have two main methods in a java class?
How we can make copy of a java object?
What is hashing principle in java?
What is sortedset in java?
Should database connections be singleton?
Explain the selection sort algorithm and state its time complexity?
What is thread life cycle in java?
What are filterstreams?