First, please take a look at the following code.

```
package test;

class c_hi {
    public static void method_hi(){
        System.out.println("hi");
    }
}

class c_bye {
    public void method_hi(){
        System.out.println("bye");
    }
}

public class test {
    public static void main(String[] args){
        c_hi.method_hi();
        c_bye c_hi = new c_bye();
        c_hi.method_hi();
    }
}

```

I've been using Java for several years, and I understand the general rules for naming class names and variable names.

However, I got a very interesting question. If the name of the reference variable of the "c\_bye" class is "c\_hi" (a class named "c\_hi" already exists),

I can't access "method\_hi" of class "c\_hi" from inside class "test".

Of course, I know that this problem can be prevented or circumvented by not overlapping class names and variable names, package separation, and FQCN etc.

Apart from the usual way of avoiding duplicate names, is there a more grammatical way to solve this problem? Please tell me your opinion. (Or, I would appreciate any documentation, links, or other questions on Stack Overflow that I can refer to.)

This code works the same for both JDK versions 8 and 15.