ilovenandini's blog

By ilovenandini, history, 14 months ago, In English

Now , we can sumbit in java 21 on codeforces and the most charming feature of java 21 is now we don't need to write public static

before java 21

public class Main{
	public static void main(String[] args){
		System.out.println(5);
	}
}

java 21

void main(){
	System.out.println(5);
}

but on codeforces , I am unable to compile this code and getting this error

Source should satisfy regex [^{}]*public\s+(final)?\s*class\s+(\w+).*
Error

This is working fine locally but not on codeforces please fix it MikeMirzayanov

  • Vote: I like it
  • -6
  • Vote: I do not like it