Error with my Pythagoras triple

Here's my Pythagoras triple code. I always get an error on the x*x + y*y = z*z

import java.util.Scanner;

public class Triples

{

public static void main(String [] args)

{

System.out.print("Please enter the value: ");

Scanner input = new Scanner(System.in);

int k = input.nextInt();

if (k<1)

{

System.out.println("Please enter a number greater than 1");

}

else

{

int x,y,z;

while (z <= k)

{

while (z == Math.sqrt(x*x + y*y));

{

while (int check = Math.sqrt(x*x + y*y));

{

if (check%2 == 0)

{

System.out.println(""+x+", "+y+" "+z+"");

}

}

}

}

}

}

}