Please help me to correct my error

import java.util.Scanner;
public class test {
public static void main(String[] args) {
System.out.println(“enter the number”);
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int i = 2;
float j = n % i;
boolean flag = true;
while (i <= n - 1) {
if(j == 0) {
flag = false;
}
i = i + 1;
}
if(flag == true) {
System.out.println(“prime”);
}else {
System.out.println(“composite”);
}
}