I've been doing the tasks in IntelliJ IDEA, and for some reason this code wouldn't print out like it does on site. When I run it on the IDE it outputs "Process finished with exit code 0". I spent a long time messing with the code thinking I had done something wrong, but when I copied it to the sites compiler it output correctly. Any ideas why?
package com.codegym.task.task03.task0315;

/*
Roy G. Biv…

*/

public class Solution {
    public static void main(String[] args) {
        Red red = new Red();
        Orange orange = new Orange();
        Yellow yellow = new Yellow();
        Green green = new Green();
        Blue blue = new Blue ();
        Indigo indigo = new Indigo();
        Violet violet = new Violet();
    }

    public static class Red {
        public Red() {
            System.out.println("Red");
        }
    }

    public static class Orange {
        public Orange() {
            System.out.println("Orange");
        }
    }

    public static class Yellow {
        public Yellow() {
            System.out.println("Yellow");
        }
    }

    public static class Green {
        public Green() {
            System.out.println("Green");
        }
    }

    public static class Blue {
        public Blue() {
            System.out.println("Blue");
        }
    }

    public static class Indigo {
        public Indigo() {
            System.out.println("Indigo");
        }
    }

    public static class Violet {
        public Violet() {
            System.out.println("Violet");
        }
    }
}