Silly question about %

I have seen Mosh use the modular sign that looks like a percentage sign. Reference (%). In coding I understand this to mean “remainder of division”. My question is - is it simply the percentage sign or is there another key that I am unaware of that I need to be using. I used the percentage sign in the Python “FizzBuzz” program, and it kind of worked, but it kind of didn’t for me too. I had troubles with the program returning FizzBuzz, but it returned Fizz and Buzz ok.

Thanks for any help with this!

Yes - the modulo operator is a percentage sign.


Now I have one more silly question. I am very green and trying to learn Java. I have setup my first program and am ready to run program Hello World. In the lesson, in the upper right corner where the run code play button is, my drop menu where it says “main” has a red “x” between the two computer icons. In Mosh’s training video, his has no red “x”. How can I correctly get setup so I can run the program?

I re-downloaded Java, I have deleted my projects and tried to rework them a few times and every time the red x appears and nothing works like it does when Mosh shows me in the video.

Thanks for any help,

I’ve run into this issue as well. If you’re using IntelliJ, then this is the way I get around it.
Rather than using the dropdown in the top to select which program you want to run, I instead right-click on the class name within my code (in you’re case, the class should be HelloWorld) and select run from that menu.

I generally only have to do this the first time, and once I’ve run it once this way, it should show up in the dropdown in the top.

I don’t know exactly why this works or doesn’t work (I’m also new), but I suspect it has something to do with how when you first run a program it creates the .class file from your java file which translate your java code to machine code that the computer can read.