Subscribe Us

Core Java - Interview Questions and Answers

261. What is the data type for the parameter of the sleep() method?

Ans : long

262. What are all the values for the following level? (max-priority,min-priority,normal-priority)

Ans : 10,1,5

263. What is the method available for setting the priority?

Ans : setPriority()

264. What is the default thread at the time of starting the program?

Ans : main thread

265. The word synchronized can be used with only a method.
True/ False

Ans : False

266. Which priority Thread can prompt the lower primary Thread?

Ans : Higher Priority

267. How many threads at a time can access a monitor?

Ans : one

268. What are all the four states associated in the thread?

Ans : 1. new 2. runnable 3. blocked 4. dead

269. The suspend()method is used to teriminate a thread?
True /False

Ans : False

270. The run() method should necessary exists in clases created as subclass of thread?
True /False

Ans : True

Post a Comment

0 Comments