Page 1 of 1

About Question com.enthuware.ets.scjp.v6.2.272 :

Posted: Tue Jan 01, 2013 2:18 pm
by ETS User
This one of this question which I don't know how to treat.

I think about this anwser: "1 new thread is created by the program."

Is not it true that when we run an application using main method at least one thread is created?

Re: About Question com.enthuware.ets.scjp.v6.2.272 :

Posted: Tue Jan 01, 2013 3:34 pm
by admin
Actually, the JVM may several threads such as a main threads and a GC thread but the given program code itself just creates one.

HTH,
Paul.

Re: About Question com.enthuware.ets.scjp.v6.2.272 :

Posted: Wed Jun 07, 2017 3:32 pm
by TwistedLizard
I find this one a but confusingly worded.
admin wrote:but the given program code itself just creates one.
in which case, option 4 should be correct.

Or, should I think that the program == main thread, and the program ie the main thread, creates no further threads?

Seems I could argue either way.

Re: About Question com.enthuware.ets.scjp.v6.2.272 :

Posted: Wed Jun 07, 2017 9:41 pm
by admin
Questions asked in the OCPJP 6 are not as clear and unambiguous as Java 7 and later. So if you are taking OCPJP 6, you should try not to read too much into the question. Use the simplest of interpretations.

HTH,
Paul.