-4
public static InfoOfFriends[] friendsInfo = null;

In the above line I didn't get what is happening there? Why there is InfoOfFriends[] because InfoOfFriends is a class which I discovered from the code? Please help me understand.

JackWhiteIII
  • 1,344
  • 2
  • 11
  • 24

1 Answers1

0

That line is declaring an array of InfoOfFriends objects. The general rule for this is is:

Type[] arrayName = new Type[elementCount];

See this for further reading about arrays in Java.

JackWhiteIII
  • 1,344
  • 2
  • 11
  • 24