<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Find Answers For ... - Recent questions tagged illegalmonitorstatexception</title>
<link>https://find4answers.com/tag/illegalmonitorstatexception</link>
<description>Powered by Question2Answer</description>
<item>
<title>What will happen when you attempt to compile and run the following code?</title>
<link>https://find4answers.com/30/what-will-happen-when-you-attempt-compile-and-following-code</link>
<description>&lt;pre&gt;
What will happen when you attempt to compile and run the following code?


public class WaNot{
int i=0;
public static void main(String argv[]){
        WaNot w = new WaNot();
        w.amethod();
        }
        public void amethod(){
	while(true){
		try{ 
        		wait();
		    }catch (InterruptedException e) {}
		i++;
	    }//End of while

	}//End of amethod
}//End of class&lt;/pre&gt;</description>
<category>Java/J2EE</category>
<guid isPermaLink="true">https://find4answers.com/30/what-will-happen-when-you-attempt-compile-and-following-code</guid>
<pubDate>Tue, 15 Nov 2011 09:50:38 +0000</pubDate>
</item>
</channel>
</rss>