Solved Java question

Discussion in 'Spigot Plugin Development' started by MadMaxCookie, May 31, 2016.

  1. Hello Spigot

    first I have :
    Code (Java):
    boolean prefix;
    I accidentally done this one with some examples in google but I don't know what it means please help.
    Code (Java):
    String message = prefix ? messageFile.getString("prefix") + messageFile.getString(key) : messageFile.getString(key);
    Note : this is working.
  2. It's called a ternary operator, basically an inlined if-statement:

    Edit: bitly'd. not possible to link that wikipedia page on spigot
  3. oh thanks for that but the wiki is not for java.
  4. Refresh.
    • Informative Informative x 1
  5. got it thanks for the link.