1. Are you ready for the Galaxy S20? Here is everything we know so far!

What does the symbols < ... > mean?

Discussion in 'Android Development' started by vizray, Dec 26, 2019.

  1. vizray

    vizray Lurker
    Thread Starter

    What does the symbols < ... > mean?
    Ex: RecyclerView.Adapter<CrimeHolder>
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Dannydet

    Dannydet Extreme Android User

    Greater than / less than.
     
  3. vizray

    vizray Lurker
    Thread Starter

    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
     
  4. Unforgiven

    Unforgiven ...eschew obfuscation...
    Moderator

    I'm as much for a light hearted comment as the next guy, but lets keep the development area focused please. :)
     
    codesplice likes this.
  5. Deleted User

    Deleted User Guest

    Code (Text):
    1.  
    2. RecyclerView.Adapter<CrimeHolder>
    3.  
    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 (Text):
    1.  
    2. List<Integer> myList;
    3.  
    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 :)
     
    23tony, Unforgiven and codesplice like this.
  6. vizray

    vizray Lurker
    Thread Starter

    Thank you lv426
     
    Unforgiven likes this.
  7. vizray

    vizray Lurker
    Thread Starter

    Wasn't trying to be rude but clarifying my question thanks
     
    Unforgiven likes this.
  8. Deleted User

    Deleted User Guest

    You're welcome. Thanks.
     
    Unforgiven likes this.
  9. Unforgiven

    Unforgiven ...eschew obfuscation...
    Moderator

    No worries, us mods sometimes step in to keep a thread pointed in the right direction. :) You are in good hands getting advice from LV. Good luck.
     
    codesplice likes this.
  10. Milo Willamson

    Milo Willamson Android Expert

    Tags usually in coding and in html :)
     
  11. dontpanicbobby

    dontpanicbobby 100% That Guy
    VIP Member

    Quote.
    I'm a User.
    Build buddy.
     
Loading...
Similar Threads - does symbols mean
  1. Cotzie
    Replies:
    3
    Views:
    136
  2. Google_is_the_Higgs_Boson
    Replies:
    0
    Views:
    270
  3. sancho_s
    Replies:
    0
    Views:
    209
  4. srajandroid
    Replies:
    2
    Views:
    298
  5. kumaranil13k
    Replies:
    0
    Views:
    226
  6. mortpiedra
    Replies:
    1
    Views:
    408
  7. mridudeandroid
    Replies:
    2
    Views:
    607
  8. Alex2873645
    Replies:
    11
    Views:
    454
  9. halfbeing
    Replies:
    2
    Views:
    648

Share This Page

Loading...