I am running this thread in one of my programs but the strange thing is as long as I have the initial value of i as 2 3 4 or anything like here its 100 it works fine but as soon as I put it 0 or 1, the thread just runs once and then ends !
What is going on ?? Please help !!!
public class MyThread extends Thread
{
private DataParser dataParser = new DataParser();
public BluetoothInput ()
{
}
public void run()
{
while (true)
{
for(short i=100;i<=10000;i+=123)
{
DataParser.parseAll(i);
try
{
Thread.sleep(1000);
}
catch (InterruptedException e)
{
}
}
}
}
}
What is going on ?? Please help !!!
public class MyThread extends Thread
{
private DataParser dataParser = new DataParser();
public BluetoothInput ()
{
}
public void run()
{
while (true)
{
for(short i=100;i<=10000;i+=123)
{
DataParser.parseAll(i);
try
{
Thread.sleep(1000);
}
catch (InterruptedException e)
{
}
}
}
}
}