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

Trending Topics

Online now

Members online
1,174
Guests online
5,541
Total visitors
6,715

Forum statistics

Threads
2,354,524
Posts
29,383,995
Members
1,079,478
Latest member
Heyanjieee
Back
Top