How to convert a java.util.List to a Scala list

You can simply convert the List using Scala’s JavaConverters:

import scala.collection.JavaConverters._

def findAllQuestion():List[Question] = {
  questionDao.getAllQuestions().asScala.toList
}

Leave a Comment