Getting error while doing below

Screenshot 2023-02-20 at 9.30.56 AM

You are in the String class, you need to be in Main, so change “public class String” to “public class Main”

1 Like

Frankly, you can change that class to almost anything other than String or System and it will work properly.