use white space formating like this. Use 4 spaces instead of tabs(set in editor), use tabs for inside methods, classes, if and loops. Place spaces between operands and operators. It makes the code more "human readable".
public class Test
{
public static main void(Strings[] args)
{
int x = 1;
int total = 0;
int t1 = 0;
for(int j = 0; j < 3; j++)
{
System.out.println("Box 00" + (j + 1) + "");
x = 1;
total = 0;//re-initialize the individual box total
while(x! = 0)
{
System.out.print("Input egg wegiht ");
x = input.nextInt();
total = total+x;
}
System.out.println("Total wegiht of the box : " + total);
System.out.println();
t1 = total + t1;
}
System.out.println("Grand Total :" + t1);
}
}