Kavita Tipnis wrote:You can make the overriding method (public void graze())
less restrictive than the overridden method(void graze()) , so C should be correct.
for (initialization; termination; increment) {
statement(s)
}
When using this version of the for statement, keep in mind that:
* The initialization expression initializes the loop; it's executed once, as the loop begins.
* When the termination expression evaluates to false, the loop terminates.
* The increment expression is invoked after each iteration through the loop; it is perfectly acceptable for this expression to increment or decrement a value.
Ankit Garg wrote:You are confused here. You are mixing releasing lock and getting CPU time. Lets take an example. Suppose I'm playing a video game. And you are sleeping in your bed. When I shout that I'm about to finish my game and you can play, it is like notifying. When I shout (i.e. notify you) you wake up and are willing to play a game (it is like a thread being eligible for CPU time). But I have not left the game console yet (i.e. when I notified you, I didn't release the lock on the object i.e. game console). I think this will make it a bit clear ...
Ankitt Gupta wrote:Believe me I found Thread very easy.I guess following K&B very nicely will build the concept.And thread is all about concept.
Deepak Bala wrote:What is it about the thread questions that make it difficult for you ?
Henry Wong wrote:
Paul Stat wrote:
Senthil Kumaran wrote: i suggest you to re look the toarray() and aslist() methods again,.,
enlighten me
No offense, but it takes less than a minute to look it up yourself. Why do we need enlighten you?
http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html
Henry
Returns an array containing all of the elements in this list in proper sequence