Question: What is wrong with this code? public class Question { public void doThing() {} public static void main(String[] args) { do Thing (); }
What is wrong with this code? public class Question { public void doThing() {} public static void main(String[] args) { do Thing (); } Nothing, the code will compile and execute without exception. The doThing () method must be declared static to be used in main() The main () method should not be declared static
Step by Step Solution
There are 3 Steps involved in it
The detailed answer for the above question is provided below The code has ... View full answer
Get step-by-step solutions from verified subject matter experts
