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.