문제

Below code should populate a Map but when I do a val test = userDataMap.get("test").get the value is null. Whis is this occuring ? This seems to be the correct way of populating a Map ?

var userDataMap = Map.empty[String, List[String]]
userDataMap += ("test" -> List("test"))

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top