kindly discuss about the scanner class and its importance

Show us the coding problems you are having.

Or write a test program that uses the Scanner class and experiment with its various methods.

Or read the API doc

kindly discuss about the scanner class and its importance

Looks like a homework assignment question to me.
Anyway you are in luck, I found the answer you are looking for here

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.