Skip to content

Commit a9fdd61

Browse files
committed
Make the example use of ArrayList a little bit more interesting
1 parent 8496f1a commit a9fdd61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Samples/JavaKitSampleApp/Sources/JavaKitExample/JavaKitExample.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ struct HelloSubclass {
119119
}
120120

121121

122-
func returnNilVector() -> ArrayList<JavaClass<HelloSwift>>? {
123-
nil
122+
func removeLast(arrayList: ArrayList<JavaClass<HelloSwift>>) {
123+
if let lastObject = arrayList.getLast() {
124+
_ = arrayList.remove(lastObject)
125+
}
124126
}

0 commit comments

Comments
 (0)