java - How many threads being created? -
in 1 of interview came across query on threads.question in below code snippet, how many threads being created? know it's seems basic query. couldn't find answer proof.
could provide me answer concept(any links)? in anticipation.
class mainapp { public static void main(string[] args) { system.out.println("welcome java"); } }
since simple program not create threads explicitly 1 application thread created here. "correct" short answer @ interview.
however can continue , jvm creates other threads needs itself. example garbage collector (gc) thread. number of gc threads depends on configuration. default 1.
Comments
Post a Comment