Тесты
Язык сайта: Русский
Українська
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
Следующая →
Зарегистрируйся сейчас
или
Подпишись на будущие тесты