just a general question. For some reason on the fizz buzz project when I created the class simple
class FizzBuzz {}

everything ran without error. However in the past anytime i created a class I started it
public class FizzBuzz{}

however in this project it throws out an error when I do that. Any idea why that would happen?

What kind of error (specifically), what does the rest of your code look like?

In java the file has to be named after your main class, so you should keep that in mind as well.

got it to work now. One more question. Here is the code I ran and everything prints correctly with the exception of “FizzBuzz”. Any reason why its not recognizing that part of the code? Thanks!

public class FizzBuzz {

public static void main(String args) {

for(int i = 0; i <= 100; i++) {

if( i % 5 = 0 && i % 3 = 0){


}else if(i%5 = 0){


}else if(i%3 = 0){





For equality condition you need == (this applies all over your code).

You can confirm and get more information in the oracle documentation

It’s not a problem now but in the future remember to format your code with the </> as it helps to highlight any issues in the code and it’s more readable.

Also in java, when using && or || you want to put the conditions within parentheses as they are separated. By documentation this is considered good practice. (I don’t think it’s the same in python, for contrast).

if ((x > 5) && (y <4)) {
  //some code