Тести
Мова сайту: Українська
Українська
English
Русский
Тести з програмування
Вхід
Реєстрація
Тести з програмування
Теорія
Сніпети
Статті
Головна
Android
Ціни
FAQ
Історія Cosmo
Правила та умови сервісу
Політика конфіденційності
Політика щодо файлів cookie
Зворотній Зв’язок
for expressions
:
Мова контенту: English
Русский
What is a generator in the following code? for(i <- 1 to 10) println(i)
for expressions
What is a generator expression in the following code? for(i <- 1 to 10) println(i)
for expressions
What will be the result of the following code execution? for ( i1 <- 1 to 5 if i1 % 2 == 0 i2 <- 1 to i1 if i2 > 2 ) println(i2)
for expressions
Is it possible to use variable trimmed in the code below without declaring it as a val? for { file <- filesHere if file.getName.endsWith(".scala") line <- fileLines(file) trimmed = line.trim if trimmed.matches(pattern) } println(file +": "+ trimmed)
for expressions
← Попередня
1
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести