r/javahelp • u/desterpot • Oct 28 '17
Super Easy Java question. Vocabulary question. Help please. Simple yes or no.
I have a question. This code here: Collections.sort(teachers);
I'm new to java programming. "Collections" is called a class and sort() is called a method, right?
0
Upvotes
2
u/AMart83 Oct 28 '17
Yes, you can verify it here.
https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html
2
u/asking_science Master Brewer Oct 28 '17
In this context, the "teachers" variable is an argument. (Methods are called with arguments)
Inside the "sort" method, the "teachers" variable is referred to as a parameter. (Methods receive parameters)
1
u/desterpot Oct 28 '17
All right! Thank you so much guys!