java

Java Socket connection getHostName

I am testing on java.net.ServerSocket.
What I want is the following.
When connecting to aaa.com, you get aaa.com,
Getting bbb.com when connecting to bbb.com.
My etc/hosts file configuration is as follows.
127.0.0.1 aaa.com
127.0.0.1 bbb.co…

Packages in java not compile

Good morning everyone!
I did a project x but all my files were out of order so I decided to group them by folders.
foldera
—ClassA.java
—ClassB.java
folderb
—Class1.java
Main.java
The problem arises when I try to compile, since in th…