I know it's the greater and less than in mathematical symbols but in programming as a set such as the curly braces {} means a group/block of code,() is the set used as parameters/declarations passed to the block what does < class > exactly describes the meaning of what process?
I searched a couple ebooks on android and kotlin and the internet and this forum and I don't know what these symbols actually represent
Means that you are using a "Generic class". It's quite a lengthy thing to explain, but the concept is that in Java/Kotlin, you can define a class which acts on objects of a certain type. An example is a List class, which may possibly contain lots of different things. With generic types or "parameterized types", you can pin this down to more specific level. Before the language introduced this feature, a List would be declared to hold any type of Object. But with a generic class, you can declare this
Code:
List<Integer> myList;
which tells the compiler that myList can ONLY hold objects of type 'Integer'. Not String or Elephant, or anything else.
If you try to put anything in that list other than an Integer object, the compiler will yell very loudly at you to not do that
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.