0

enter image description here

class A {
    A get() {
        return this;
    }
}

public class B1 extends A {
    B1 get() {
        return this;
    }

    void message() {
        System.out.println("Covariant Return type example");
    }

}

Pretty annoyed to see this UI. How do I make Intellij show this class as a normal class?

logbasex
  • 1,688
  • 1
  • 16
  • 22

1 Answers1

2

The behavior is expected. If a class has multiple other classes declared inside it, they are shown as child entries for the 'main' class in Project view (and built as separate .class files upon compilation).

If you want to be able to open the 'main' class in the Editor instead of drilling down to the nested ones, you can select it in the Project view and hit F4 ('Jump to Source' action).

Koyasha
  • 5,275
  • 2
  • 8
  • 17