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

Status
Not open for further replies.
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.
 
Status
Not open for further replies.

About this Thread

  • 3
    Replies
  • 358
    Views
  • 3
    Participants
Last reply from:
Arjienx

Trending Topics

Online now

Members online
440
Guests online
1,503
Total visitors
1,943

Forum statistics

Threads
2,295,346
Posts
29,097,365
Members
1,206,819
Latest member
turdy666
Back
Top