1

i have to declare a class parameter of type nullable list(contaning String) with list default value= null

data class Riga(
var frase1 : List?<String>= null
)

this is raising:

Property getter or setter expected 

One type argument expected for interface List<out E>
fisio
  • 494
  • 6
  • 12
  • 1
    You have to define the type (`List`), then add a question mark (`?`) to the end. `List?` look at the [null safety](https://kotlinlang.org/docs/reference/null-safety.html) documentation – Lionel Briand Nov 13 '19 at 18:47

1 Answers1

1
var frase1 : List<String>? = null
wseme
  • 805
  • 6
  • 14