Main Method not found error in inheritance/superclass Java - (main in test method)

0 votes
asked Mar 25, 2019 by Fred Shattell (120 points)

Hello,

I have been working on this program for the last few days and I am trying to figure out why I cant compile this program - I get the main method not found define and public static void main... error but the main is in my source code called TestingClass.Java I have included the link to the program below. 

https://onlinegdb.com/Hk87BFSOE

This is a new concept for me so the answer might be obvious.

Thanks!

2 Answers

0 votes
answered Apr 2, 2019 by arunparmar007 (140 points)
Have you tried this on local IDE? This might be the online compiler.
0 votes
answered Apr 8, 2019 by anonymous
Hey,

In Online compiler they expect  Main as your Major class(it should contain your main method)

Just Swap your classes and change accordingly it will work fine.

don't forget to call your getAccountInfo()  ( ie, bankAccount.getAccountInfo() )

Thanks
commented Apr 9, 2019 by anonymous
Thanks everyone  for the help I got it figured out and I also was able to get it work nicely in eclipse!
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...