Getting input from user in java

Veröffentlicht am: 04 April 2017
auf dem Kanal: kudvenkat
23,713
132

Java tutorial for beginners playlist
   • Java tutorial for beginners  

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
   / @aarvikitchen5572  

In this video we will discuss
1. Understanding java packages
2. Taking input from user
3. Streams
4. Scanner

Streams
1. Streams are objects representing source or destination of data
2. They are ordered sequence of bytes (length undefined)
3. System.in, System.out and System.err
4. System.in is InputStream to read standard input

Scanner
1. Breaks the input into tokens using a delimiter
2. Simple text scanner that can parse primitive types + Strings
3. Delimiter is whitespace by default
4. Possible to set delimiter using useDelimiter function

public String next() - Returns the next token
public String nextLine() - Returns the next line as a String
public byte nextByte() - Returns the next token as byte
public int nextInt() - Returns the next token as integer
public short nextShort() - Returns the next token as short


Auf dieser Seite können Sie das Online-Video Getting input from user in java mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer kudvenkat 04 April 2017 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 23,713 Mal angesehen und es wurde von 132 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!