0

enter image description here

This is my code and after compiling it, I received the error in the title. Any help?

I tried switching AbsoVal with DoubAbso and vice versa but nothing worked.

  • 2
    Every public class that's not inside another class has to be in its own file. The name of that file has to match the name of the class. In your case, that means you have to split your program across two files. – Dawood ibn Kareem Mar 31 '22 at 00:19
  • How do I put another class in its own file? – Enes Altug Mar 31 '22 at 00:20
  • "How do I put another class in its own file?" Well - the code that you showed is in a file, called `AbsoVal.java`, correct? You put the `public class AbsoVal` into that class, correct? *How did you do that? Now, do the same thing* with a new file, named `DoubAbso`, to put the `public class DoubAbso` there. – Karl Knechtel Mar 31 '22 at 00:32
  • 1
    Welcome to Stack Overflow. [Please do not upload images of code/errors when asking a question.](//meta.stackoverflow.com/q/285551) – Karl Knechtel Mar 31 '22 at 00:33

0 Answers0