answersLogoWhite

0

If you mean to pass two parameters to a method, the method would have to include the two variables in its "signature". For example:

myMethod(int a, int b) {...}

To call the method, you also have to pass two parameters, in parentheses. For example:

result = myMethod(x, y);

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How can I convert a float to a double in Java?

To convert a float to a double in Java, you can simply assign the float value to a double variable. Java will automatically perform the conversion for you. Here's an example: java float floatValue 10.5f; double doubleValue floatValue; In this example, the float value 10.5f is assigned to the double variable doubleValue, which will now hold the converted double value.


What is native variable in java?

native is a key word used in java method. there is no variable as native in java


How you make shared and synchronized variable in java thread?

A Variable that is shared as well as synchronized cannot be created in Java. These two terms are mutually exclusive and a variable that is synchronized in java cannot be shared and vice versa


What is the syntax of global variable in java?

There's no global variables in Java.


What is a variable type in Java?

int


Can you define variables in interface in java?

yes we can define a variable in an interface in java.


What is the code required to convert an integer variable to a string variable in Java?

There are several different methods to convert an integer variable to a string variable in Java. For example, one can use the following code to convert an integer variable to a string variable: Integer.toString(number)


How do you equate a php variable to a javascript variable?

Ideal thing would be to retrieve the value from PHP using AJAX and then assigning it to a java script variable. Thereafter compare it to the java script variable that is already present.


Can a java program has two different variable?

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


What is instance variable in java?

That refers to a variable attached to an object - also known as a field.


What is the meaning of a method in Java programming?

a method is a variable


How do you increase a variable by 5 in Java?

variable_name=variable_name+5;