Your code should look like this.
click on code tag and paste your code between them.
and on SPOJ you should not use public before class if you are using public you class name should be main.
Your algorithm is completely wrong, what problem is asking is you have to print all number until you encounter 42 in the input. Input can be any integer value it is not only between 1 and 100,and no need to print Started or finished in the output you have to print only those things which problem is asking for.
Hope this helps.
class Life
{
int inputArray[];
Life(int a[])
{
inputArray=a;
}
void printResult()
{
System.out.println("Started");
//System.out.println(inputArray[0]);
for(int i=0;i<=inputArray.length-1;i++)
{
if(inputArray[i]==42 &&(inputArray[i]>99)&&(inputArray[i]<-99))
break;
System.out.println(inputArray[i]);
}
System.out.println("FINISHED");
}
public static void main(String[] args)
{
int c[]={1,3,4,5,1,2,3,7,8,9,0,1,2,3,42,4,5,6,7,8,4};
Life ob=new Life(c);
ob.printResult();
}
}