Scala function returns Unit but should return Int
I just started learning Scala last week. I created a stub method in one of my programs but was getting an error. Here’s my function: def howMuch(max: Int) { var n = 0 n } I tried to use the result in expression, e.g. var m = 1 var n = howMuch(100) m += n … Continue reading Scala function returns Unit but should return Int
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed