debugging in netbeans IDE
<p>I have 2 programs in myapplication called a.java and b.java,a.java acts as a server and b.java acts as a client,when server gots client,the server should send all the avalable id's in mysql table to client, and i have tried the following code:</p>

<p>i am using <code>bufferedreader</code> and <code>bufferedwrite</code>r to read and write data.
<code>a.java</code> contains the following code:</p>

<pre><code>String data="";
data='$'+data+'@';
out.write(data);
out.flush();
</code></pre>

<p>here data contains id's.</p>

<p><code>b.java</code> contains the following code to read the above data from a.java:</p>

<pre><code>if(in.ready())
while((data = in.read())!=-1) {  
   char ch=(char)data;
}   
</code></pre>

<p>here in <code>b.java</code> i am able to read data from <code>a.java</code> but the problem is whenever i am keeping breakpoint at <code>out.flush</code> in <code>a. java</code> and breakpoint at <code>if(in.ready)</code>,<code>out.flush()</code> is not going to intended destination i.e<code>,while((data = in.read())!=-1)</code>,but whenever i am closing a.java  the debugging point in b.java is activating,can you please help me to solve this.</p>
