Возвращающиеся методы
public class App {
public static void main(String[] args)
{
int x = 3;
int answer = addFive(x);
System.out.println("answer is = " + answer);
}
private static int addFive(int px)
{
px += 5;
return px;
}
}
Hungry Hoopoe