boolean isavail=false;
new Thread(){
	public void run() 
          {				
.
.
.
				
		isavail=fun();
.
.
.

          }
}.start();

I need that value assigned in the run() method ..... But eventhough the function returns "true", the value being present in that variable after the thread is
"false" only......

How to get that value????????

I am very new to threads and all, so i need a little bit of help plz....... :)

Sorry ....... I realized my mistake...... i acccessed the value even before the thread was finished ...... that was my mistake thank u ..... :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.