0

how can i call a method in an if else statement?

8th Mar 2022, 2:06 AM
Japheth
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.
8th Mar 2022, 3:39 AM
AÍąJ
AÍąJ - avatar
0
Yes
8th Mar 2022, 2:47 AM
Rupali Haldiya
Rupali Haldiya - avatar
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 }
8th Mar 2022, 3:01 AM
Japheth