Solved On command string[] or args[]

Discussion in 'Spigot Plugin Development' started by UnlimitedNinjas, Jul 22, 2018.

  1. I see some people in oncommand they do at the end , String[] args)
    Does this effect anything? I use String args[]
     
  2. They will work the same, however, it is preferred to use Object[] array rather than Object array[] for Java. Originally the second way comes from the C/C++ language and was adopted in Java to accommodate C/C++ programmers.
     
  3. There is no difference. However, I find String[] args is better for readability.
     
  4. Strahan

    Benefactor

    The only affect is that it effects an array of String :)
     
  5. So not really a thing that can cause bugs?
     
  6. Strahan

    Benefactor

    No, it makes no difference.