I have this Scala method with below error. Cannot convert into a Scala list.
def findAllQuestion():List[Question]={ questionDao.getAllQuestions() }
Import JavaConverters , the response of @fynn was missing toList
JavaConverters
toList
import scala.collection.JavaConverters._ def findAllQuestion():List[Question] = { // java.util.List -> Buffer -> List questionDao.getAllQuestions().asScala.toList }