🔒 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
  • 350
    Views
  • 3
    Participants
Last reply from:
Arjienx

Online now

Members online
582
Guests online
757
Total visitors
1,339

Forum statistics

Threads
2,275,117
Posts
28,960,738
Members
1,233,600
Latest member
Emmanuel1011
Back
Top