Call by value is, when a primitive data type is sent as an argument to the function it returns the data sent by function.
import java.util.Scanner;
public class Even
{
static void checknumber (int n)
{
if(n%2==0)
System.out.println("Even");
else
System.out.println("Odd");
}
public static void main(String[] args)
{
System.out.println("Enter a number");
Scanner in = new Scanner(System.in);
int n=in.nextInt();
Even.checknumber(n);
}
}
This way you can implement the program.