Can we call the Thread.sleep in Synchyronozed block?

Answer Posted / ravikiran

Yes we can call,And should be enclosed between try catch
blocks beacause Interupted exception may be thrown.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sortedset in java?

575


Explain about automatic type conversion in java?

573


Why do we use variables?

517


Write a factorial program using recursion in java?

518


When we serialize an object does the serialization mechanism saves its references too?

509






Give few difference between constructor and method?

522


Can we execute a program without main?

541


What are the basic interfaces of java collections framework?

608


What are the rules for naming an array?

527


What is a two-pass assembler?

611


Explain polymorphism citing an example.

592


Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.

2283


What do you understand by the term polymorphism?

632


What is intern method in java?

585


What is the size of arraylist in java?

608