I created a calculator program using GUI. My question is how can I keep the "main" method running so I can occasionally check for changes and make updates?
Who is Participating?
Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
If you are running a GUI program using AWT/ Swing, the program will keep running until the main Frame or JFrame is closed (and has a default operation of exit on close).

Otherwise you can put an infinite loop in the main () method or wait for the user to input something like "exit" in the command line.
shahrine99Author Commented:
Mayank SAssociate Director - Product EngineeringCommented:
Glad to.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.