String, StringBuilder, Arrays & ArrayList Flashcards
Can the size of an array be specified when it is declared?
No. The size of the array comes from the initialisation on the right hand side of the assignment.
Can an array be initialised and have space explicitly assigned?
No. This will not compile if you try to initialise the array and explicitly create space as part of the initialisation of the array.
Describe all String methods and their nuansances
charAt() concat() equalsIgnoreCase() length() replace() substring() toLowerCase() toString() toUpperCase() trim()
Describe the substring method on String
Arrays are indexed beginning at 0 and when you substring them the second parameter is not indexed at position 0. No second parameter will substring to the end of the String object.
Describe the trim method on String
trims BOTH trailing and leading white space.