Philipp Reger
Quiz by , created more than 1 year ago

Informatik Quiz on Scala Methoden, created by Philipp Reger on 07/01/2018.

0
0
0
Philipp Reger
Created by Philipp Reger almost 6 years ago
Close

Scala Methoden

Question 1 of 2

1

Fill the blank spaces to complete the text.

Geben Sie die Definition einer Scala Methode an, die die folgenden Eigenschaften erfüllt.
- Instanzvariablen x und y jeweils von Typ Int
- Rückgabewert von Typ Int

def methode(, ) = {
...
}

Explanation

Question 2 of 2

1

Setzen Sie die folgende while-Schleife so zusammen, dass der Inhalt ausgeführt wird, solange i kleiner als x ist.

val i: Int = 0
val x: Int = 0
while(i){
x += 2
+ = 1
}

Drag and drop to complete the text.

    i
    a
    b
    <
    >
    <=
    >=
    +
    -
    x
    y
    z

Explanation