0
how can i call a method in an if else statement?
3 Answers
+ 3
Japheth
Provide full code to understand what you want.
Here RegistryInterface is a class and doAddStudent is a static method which can be directly access through the class name.
0
Yes
0
Rupali i mean how
i only found this option and dont understand this "registry interface"
public static void main(String[] args) { //some code Scanner in = new Scanner (System.in);
char choice = in.next().charAt(0);
if(choice == 1) { RegistryInterface.doAddStdent(student); } //some code }