package src.sheet1.question1;
class OneFourTwoOne {
public static void main(String[] args) {
assert args.length == 1;
int x = Integer.parseInt(args[0]);
System.out.print(x);
while(x != 1) {
x = next(x);
System.out.print(" " + x);
};
}
static int next(int x) {
return ((x % 2) == 0) ? (x / 2) : (3*x + 1);
}
}
when I input :java OneFourTwoOne in the terminal, here occurs an error: Error: Could not find or load main class OneFourTwoOne How can I run it?