This is a very basic question. I am new to Java and programming in general. I am familiarizing myself with a rather large code, and I do not understand the purpose or function of a particular type of line. I understand the example lines below and have included comments to describe what is happening.
public class MainClass;
private static final int SOME_CONSTANT = 2; // declares and initializes constant
private String someMessage; // declares an object of type String
However, I do not understand what is happening below. These types of declarations occur directly after the above code in the same MainClass.
private DifferentClass differentClass; // declaring an object of type DifferentClass??
public AnotherDifferentClass anotherDifferentClass; // same thing?
Are objects being declared here in the same way that String objects are declared?
I know this is very basic stuff. I appreciate any assistance provided. If interested, feel free to direct me towards any additional resources/reading that you may have found helpful when you were learning.