I do not have a lot experience with Java, so i tested your code (with small changes) in C#:
for(int abc=100;abc<1000;abc++)
{
int a=abc/100;
int b=abc%100/10;
int c=abc%10;
int sum=a+b+c;
int sum2 = (int)(System.Math.Pow(a,2) + System.Math.Pow(b,2) + System.Math.Pow(c,2));
if(sum==sum2)
{
Console.WriteLine("abc={0} a={1} b={2} c={3} sum={4} sum2={5}", abc, a, b, c, sum, sum2);
}
}
and using Linq query too:
var qry = Enumerable.Range(100, 900).
Select(z=> new{a = (int)z/100, b = (int)z%100/10, c = (int)z%10}).
Select(n=> new{a = n.a, b = n.b, c = n.c, sum = n.a+n.b+n.c, sum2 = (int)(Math.Pow(n.a,2) + Math.Pow(n.b,2) + Math.Pow(n.c,2))}).
Where(x=>x.sum==x.sum2).
Select(f=>f);
Result is the same:
a b c sum sum2
1 0 0 1 1
1 0 1 2 2
1 1 0 2 2
1 1 1 3 3