Hi

what is the difference between the following two code

public int calculate(int x, int level)

and

public int calculate()
int x;
int level;


Is there a way to make this first method to something like the second method?

thanks

Hi

what is the difference between the following two code

public int calculate(int x, int level)

and

public int calculate()
int x;
int level;


Is there a way to make this first method to something like the second method?

thanks

The second one doesn't make any sense to me. This makes sense:

public int calculate()

but this doesn't:

public int calculate()
int x;
int level;

Are there supposed to be brackets somewhere?

public int calculate()
{
     int x;
     int level;
}