int i = 4, j = 2, k = 1;
if ((i % j) == k)
{
    System.out.print(i+j);
}
else
{
    System.out.print(i-j);
}