What is the difference between CharSequence[] and a String[]?

后端 未结 7 1395
野的像风
野的像风 2020-12-24 10:32

What is the difference between CharSequence[] and String[]?

7条回答
  •  甜味超标
    2020-12-24 10:56

    CharSequence is an interface. String is a class that implements the CharSequence interface. That means a String object passes as a CharSequence object. There are different classes that implement the CharSequence interface. They all define the methods that correlate with the method signatures (or abstract methods?) that the interface CharSequence provides.

提交回复
热议问题