I'm not very experimented with
Java, and that's why I'm asking here.
I have a program with 4 classes, all of them in the same package, one of them is the
Main class, and in that class
I declared a variable named "port" of type int.
One of the 3 another ones is the class
Connection class, which it requires the port variable.
So, my question is the following: I want to use this variable in the Connection class. How can I do it?
Both classes are shown below:
Main.java
Connection.java