Syntax error on token “;”, { expected after this token in Random string creator

In Java, you cannot directly write the executable statements in class. You need to move your code in a method. Only variables declaration is allowed outside the method/blocks. Just for the sake of testing, ,move everthing to main method. Try this: public class Orders { public static void main(String argsp[]) { String alphabet = “abc”; … Read more