This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query:

 
shailesh Jammie
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i m new to java. I have a doubt a snipplet. weather it will work fine or not ?
can some one suggest me?


private Object[] a;

public synchronized void find(Object key)
{
find(key);
}


in this code i m using the method synchronized and calling the same method
recursivly. my doublt is weather this code will run fine or run with some run time exception.


thanks in advace..
Shailesh
[ January 27, 2006: Message edited by: shailesh Jammie ]
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try it and see. What did you discover?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic