can we add two numbers without using arthematic operators?
if possible how?

Answer Posted / sravanthi

Yes we can 2 numbers without using arthematic operator.
We can use logical operators instead of arthematic operator.
The ex program is
class A
{
public static void main(String a[])
{
byte a=5;
byte b=6;
int c;
c=a||b;
System.out.println(c);
}
}

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does java have a compiler?

551


What will happen if static modifier is removed from the signature of the main method?

521


Explain thread in java?

658


what do you mean by classloader?

545


What are the disadvantages of object oriented programming?

586






Why are the objects immutable in java?

542


What is the multi-catch block in java?

528


Can we clone singleton object in java?

558


In which language java is written?

532


What is the r character?

582


Which is better singleton or static class?

501


how many types of Inheritance?

641


How do you call a reference in java?

513


Explain purpose of sleep() method in java?

610


What is the benefit of using enum to declare a constant?

653