This question might be a really newbie one, but it's pretty confusing to me. I'm working on Java networking, and I'm curious as to the back-end of the main
method.
public static void main(String[] args) throws IOException
I understand it that the main
starts one thread? So even if I have a simple "Helloworld" program, a thread stays alive until you close the whole IDE or system?
Does that mean I can include any arbitrary code in the main method, which I want to run forever too( for example, a heartbeat sensor check or some other checks).
thanks