answersLogoWhite

0

Write a java program of addition of two variables?

Updated: 8/17/2019
User Avatar

Wiki User

15y ago

Best Answer

public class AddNumbers{

public int add(int a, int b){

return a + b;

}

}

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a java program of addition of two variables?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can a java program has two different variable?

Yes. You can have as many variables as you want in Java


How we can get address of variables in Java as pointer variables in C?

At any given point of time you cann't get the address of a variables of java program. This is meant for security purpose only.


Can we add website link when we write java program?

yes ,i can add the website link in java program when we write.


Write a c program Fibonacci series using for loop in java?

Exactly what do you mean by 'C program in Java'


Java program to swap values of 2 variables?

a=a+b; b=a-b; a=a-b;


What is javadoc?

write a java program to display "Welcome Java" and list its execution steps.


How write new line program in java?

\n


How do you write a java program for finding multiligual languages?

You can use Java's built-in functions to write a code that will find multilingual languages.


Write java program for addition of two objects?

May be link might help -> http://www.allinterview.com/viewpost/408298.html There it is implemented through...... Operator Overloading!


How java is 100 percent Internet based?

It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.


How do you write the program to search for a word in an array of 5 words?

Write a loop that compares the word with every word in the array. For example, in Java, I think it would be something like this: // Declare some variables here ... for (int i = 0; i


Write a java code to draw a circle inside in an ellipse?

write a program draw circle and ellipse by using oval methods in java