Мой класс с двумя методами:
public class Routines {
public static method1() {
/* set of statements */
}
public static method2() {
/* another set of statements.*/
}
}
Мне нужно вызвать метод 1() из метода 2(). Какой из следующих подходов лучше?
public static method2() {
method1();
}
Или:
public static method2() {
Routines.method1();
}
Подробнее здесь: https://stackoverflow.com/questions/349 ... ass-method