Thank you, I have changed it to Array<Book>
and now it works quite fine.
@gidds I am quite new in Kotlin with several years in PHP in background, so somewhere there is coming my confusion. PHP has types, but casting actually means converting, for example gettype((int)"some string") === "integer"
As I am working on PoC (with given limited and short time), that Kotlin is good and mature technology, Its something like jump into water, so sorry for silly questions I may ask in future