Scala List isEmpty Operation with example Last Updated : 13 Aug, 2019 Improve Improve Like Article Like Save Share Report The isEmpty operation is utilized to check if the stated list is empty or not. Syntax: m1.isEmpty Here, m1 is Map name. isEmpty is method which returns true if the stated list is empty else it returns false. Example #1: // Scala program of isEmpty() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Creating a list val m1 = List(6, 8, 9, 12) // Applying isEmpty method val result = m1.isEmpty // Displays output println(result) } } Output: false Example #2: // Scala program of isEmpty() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Creating a list val m1 = List() // Applying isEmpty method val result = m1.isEmpty // Displays output println(result) } } Output: true Like Article Suggest improvement Previous Scala List length() method with example Next How to Reverse keys and values in Scala Map Share your thoughts in the comments Add Your Comment Please Login to comment...