Help to resolve it...cant take inputs

import java.util.*;

import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int n=s.nextInt();

	boolean flag = true;
	int div = 2;
	while (div <= n - 1) {
		if (n % div == 0) {
			flag = false;
			System.out.println("non prime");
			return;
		}
		div = div+1;
	}if(flag= true) {
		System.out.println("prime");
	} 

}

}

@Mudit_Rana,
https://ide.codingblocks.com/s/234186 corrected code.
I have added comments on the errors.
To take input create an object of the scanner class.

	Scanner sc = new Scanner(System.in);

Here Scanner is the class. sc is the object. For int input use: sc.nextInt()

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.