What's new

Java Help po!!! Paano po mag create ng program using parameter passing?

Elmatatag

Honorary Poster
Joined
Mar 13, 2017
Posts
454
Reaction
82
Points
191
First time ko po mag tanong dito, I hope matulungan nyo po ako.
 
Yes, First you need to know how to create a class also you must know how to use this. Those under this class can be parameters by calling the statement and passing Values, Object or perform operations.

ex.
MyClass
private int Addition (int a, int b){
int c;
c = a + b;
return c;
}

how to use.?
locate the class from your main.
declare location.myclass;

now you can use this directly.

int a = get the value from your field
int b = get the value from your field

System.out.println(Addition(a, b)+"");

cuz it won't print in it's int format.
 
Back
Top