Java Scanner Class Methods - Reading Input from the Keyboard - next nextInt nextDouble char

preview_player
Показать описание

Here are some commonly used Scanner methods:

next() - read as String up the the blank space delimiter
nextLine() - read a String to the end of the line, including spaces
nextInt() - read an integer
nextDouble() - read a double (floating point number)
nextBoolean() - read a boolean
nextLong() - read a long
nextByte() - read a byte
nextShort() - read a short
next().charAt(0) - read the first character of a string (char)

The Basic Parts of a Java Program - Class and Main Method Header and Comments

Java Declaring and Initializing Variables

Naming Java Identifiers - Variables, Methods, and Object Names - Java Tutorial

Java Reserved Keywords - Words like public static void class int double

Java Primitive Data Types - byte short int long float double char and boolean

Java Integers - int long byte and short Integer Variables

Java Floating Point Numbers - float and double

Java E Notation - Doing Scientific Notation in a Java Program

Java Integer Division and Dividing by Zero - Java Tutorial - Appficial

Java Basic Math Arithmetic Expressions and Precedence Rules

Java Compound Operators - Combined Assignment Arithmetic Operator Examples

Java Constants - Constant Variables using Keyword Final

Java Math Class Methods

Java Type Conversions and Type Casting

How to Convert Binary numbers to Decimal Numbers

Java Characters - The char Primitive Data Type

Java Escape Characters

Java String Class

Java Scanner Class

Java Integer Overflow

Java Style Guidelines
Рекомендации по теме
Комментарии
Автор

Please SUBSCRIBE! More programming videos coming soon! ✌️

Appficial
Автор

You had me at "You love the D."

In seriousness, thanks for helping me get my noodle around the next method.

aguynamedshelly
Автор

That joke at the end...superb *slow clap*

iliandaskalov
Автор

Thanks for helping me.. In my practical.. God bless u

themysteriousman
Автор

Haha this is exactly the kind of programming help I was looking for

checker_boarder
Автор

you are great ...thanks for helping me out

hikikomori
Автор

DONALD TRUMP WANTS TO KNOW YOUR LOCATION🤣🤣

dhruvpawar
Автор

Hey I have a question so I'm trying to create a different scanner method where I ask the user what their major is

I imported the java.util.Scanner I did "what is your name?" and "How old are you" I then wanted to ask "What is your major?" So I was going to use the

"String major =keyboard.nextLine();" but it completely skips that part... What am I doing wrong??

The funny thing is that when I use the method nextLine on the "What is your name" it works :/

joelduran
Автор

Hmm i wonder what does the letter d mean 🤔

zemu
Автор

2:25
LOL i jsut thought the ide itself hates trump N doesn't want to print out his name

moftahhussen
Автор

Does it work when your name is Joe Biden ?

tariktoudert
Автор

Bro one doubt why we have to put this statement import java.util.scanner ; what is the meaning of this ☹️

MAGAVISHNUT