Answer the question
In order to leave comments, you need to log in
Is this piece of code considered normal?
public class Test {
StudentBase studBase;
Test() {
studBase = new StudentBase();
}
public static void main(String[] args) {
new Test().start();
}
private void start() {
studBase.initStudBase();
studBase.showAllStudentsInfo();
studBase.showAllStudAtletter();
}
}
Answer the question
In order to leave comments, you need to log in
Access modifiers are not superfluous, except if you want to make fields\methods package-private
public class Test {
private StudentBase studBase;
private Test() {
studBase = new StudentBase();
}
public static void main(String[] args) {
new Test().start();
}
private void start() {
studBase.initStudBase();
studBase.showAllStudentsInfo();
studBase.showAllStudAtletter();
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question