Normal
Also ist die Art der Variable von MyVar ein Scanner-Typ? Statt .nextLine könnte da auch. nextInt stehen. Würde das die Variable nicht in ein Integer umwandeln? Also was bedeutet dieses nextLine oder nextInt? Ich habe in einer App folgende Beschreibung :You can now read in different kinds of input data that the user enters.Here are some methods that are available through the Scanner class:Read a byte - nextByte()Read a short - nextShort()Read an int - nextInt()Read a long - nextLong()Read a float - nextFloat()Read a double - nextDouble()Read a boolean - nextBoolean()Read a complete line - nextLine()Read a word - next()
Also ist die Art der Variable von MyVar ein Scanner-Typ? Statt .nextLine könnte da auch. nextInt stehen. Würde das die Variable nicht in ein Integer umwandeln? Also was bedeutet dieses nextLine oder nextInt? Ich habe in einer App folgende Beschreibung :
You can now read in different kinds of input data that the user enters.
Here are some methods that are available through the Scanner class:
Read a byte - nextByte()
Read a short - nextShort()
Read an int - nextInt()
Read a long - nextLong()
Read a float - nextFloat()
Read a double - nextDouble()
Read a boolean - nextBoolean()
Read a complete line - nextLine()
Read a word - next()