public class Main
{
public static void main(String[] args)
{
for (int i = 0; i <= 255; i++)
{
if (i < 16) // 0 in the beginning of the first row
{
System.out.print("0");
}
System.out.printf("%1$s ", String.valueOf(i, 16)); // Hexadecimal
if (i % 16 == 15) // Jump to next line after 16 data
{
System.out.println();
}
}
}
}