Back to Browse

Reading Input from the Keyboard in Java

257 views
Jan 28, 2022
13:27

In this video, I am going to show you how to read the values from the keyboard by using Scanner Class. By using Scanner Class the user can input the values of his own choice . Below, I have written different Methods for different Datatypes. 1) Reading an int using the nextInt() method in Java. 3. Reading a float using the nextFloat() method in Java. 4. Reading a double using the nextDouble() method in Java. 5. Reading a boolean using the nextBoolean() method in Java. 6. Reading a char using the next().charAt() method in Java. 7. Reading a String using the nextLine() method in Java. This series, Basic Java, is made for absolute beginners who have no programming experience and want to learn how to code in Java. Java is a very widely used programming language used for everything from apps to AI. Learning how to program in Java can be intimidating, but I try to break it down to help all of you new/self-taught programmers out there! Umair Nazim

Download

0 formats

No download links available.

Reading Input from the Keyboard in Java | NatokHD