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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -