Below is the code I have developed for a thread.
int i;
Thread thread = new Thread()
{
@Override
public void run() {
try {
while(true) {
sleep(10000);
i++
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
};
thread.start();
Is there any possible way I can use any other catch or exception to catch all possible crushes within it? Thank you in advance!