Which input suits?

Report a typo

Here is the code that uses the Scanner class:

val scanner = Scanner(System.`in`)
val s1 = scanner.nextLine()
val s2 = scanner.nextLine()
val num = scanner.nextInt()

Which input suits this snippet? After reading the input each variable must have a value.

a)

abc def
123

b)

abc
def 123

c)

1000
abc
3

d)

abc def 123
Select one option from the list
___

Create a free account to access the full topic