Class Assignment

import java.util.;
public class Main {
public static int assign(int n){
if(n==1 || n==2)
public static void main(String args[]) {
Scanner sc=new Scanner(;
int t=sc.nextInt();
for(int i=1;i<=t;i++){
int k=sc.nextInt();
int j=assign(k);
System.out.println("#"+i+" : "+j);
Compiling failed with exitcode 1, compiler output:
prog.cpp:1:1: error: ‘import’ does not name a type; did you mean ‘short’?
import java.util.
plzz tell me what’s hte problem in my code

@Sweta, I have attached the correct code. The error was you need to put a ‘*’ in

Hi, can you please explain the theory of this code?