Dont mind saying you are stupid....
but here is my code and the error i get
new ThreadOne();
new ThreadTwo();
int calc;
try{
for(int j = 0; j<=5; j++ )
calc = j *(500 - j);
System.out.println("in Main Thread Multiplying :" + calc); //its saying "variable calc might not have been initialized"
Thread.sleep(200);
}
catch(InterruptedException e){
System.out.println("Main thread interupted");
}
why does it let me assign value to it if it is not initialized? or am i missing something when i say calc?
Help please

New Topic/Question
Reply




MultiQuote





|