Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA
  • Practice Problems
  • Python
  • C
  • C++
  • Java
  • Courses
  • Machine Learning
  • DevOps
  • Web Development
  • System Design
  • Aptitude
  • Projects
Similar Topics
Web Technologies
39.3k+ articles
DSA
22.4k+ articles
Python
20.3k+ articles
Experiences
17k+ articles
Java
10.5k+ articles
Java-Functions
4.1k+ articles
Difference Between
3.6k+ articles
Java - util package
1.5k+ articles
Java-I/O
75 articles
Input and Output
20 articles

Java-Scanner

15 posts
Difference between next() and nextLine() methods in Java
Last Updated: 27 December 2021
The Scanner class in java.util package used for obtaining the input of the primitive types like int, double, etc. and strings. It is the eas ...read more
Java
Input and Output
Difference Between
Java-Scanner
Why is Scanner skipping nextLine() after use of other next functions?
Last Updated: 02 September 2021
The nextLine() method of java.util.Scanner class advances this scanner past the current line and returns the input that was skipped. This fu ...read more
Java
Java-Scanner
Scanner ioException() method in Java with Examples
Last Updated: 16 October 2018
The ioException() method of java.util.Scanner class returns the IOException last thrown by this Scanner's underlying Readable. This method r ...read more
Java
Java - util package
Java-Functions
Java-Scanner
Similar Topics
Web Technologies
39.3k+ articles
DSA
22.4k+ articles
Python
20.3k+ articles
Experiences
17k+ articles
Java
10.5k+ articles
Java-Functions
4.1k+ articles
Difference Between
3.6k+ articles
Java - util package
1.5k+ articles
Java-I/O
75+ articles
Input and Output
20+ articles
Scanner match() method in Java with Example
Last Updated: 16 October 2018
The match() method of java.util.Scanner class returns the match result of the last scanning operation performed by this scanner. Syntax: pub ...read more
Java
Java - util package
Java-Functions
Java-Scanner
Scanner hasNextLine() method in Java with Examples
Last Updated: 16 October 2018
The hasNextLine() method of java.util.Scanner class returns true if there is another line in the input of this scanner. This method may bloc ...read more
Java
Java - util package
Java-Functions
Java-Scanner
Scanner hasNextFloat() method in Java with Examples
Last Updated: 16 October 2018
The hasNextFloat() method of java.util.Scanner class returns true if the next token in this scanner's input can be interpreted as a Float us ...read more
Java
Java - util package
Java-Functions
Java-Scanner
Scanner hasNextDouble() method in Java with Examples
Last Updated: 16 October 2018
The hasNextDouble() method of java.util.Scanner class returns true if the next token in this scanner's input can be interpreted as a Double ...read more
Java
Java - util package
Java-Functions
Java-Scanner
Scanner hasNextBoolean() method in Java with Examples
Last Updated: 16 October 2018
The hasNextBoolean() method of java.util.Scanner class returns true if the next token in this scanner's input can be interpreted as a Boolea ...read more
Java
Java - util package
Java-Functions
Java-Scanner
Scanner hasNextBigDecimal() method in Java with Examples
Last Updated: 16 October 2018
The hasNextBigDecimal() method of java.util.Scanner class returns true if the next token in this scanner's input can be interpreted as a Big ...read more
Java
Java - util package
Java-Functions
Java-Scanner
Scanner hasNextBigInteger() method in Java with Examples
Last Updated: 17 November 2022
The hasNextBigInteger() method of java.util.Scanner class returns true if the next token in this scanner's input can be assumed as a BigInte ...read more
Java
Java - util package
Java-Functions
Java-Scanner
Scanner hasNextInt() method in Java with Examples
Last Updated: 17 November 2022
The hasNextInt() method of java.util.Scanner class returns true if the next token in this scanner's input can be assumed as a Int value of t ...read more
Java
Java - util package
Java-Functions
Java-Scanner
Scanner hasNextByte() method in Java with Examples
Last Updated: 17 November 2022
The hasNextByte() method of java.util.Scanner class returns true if the next token in this scanner's input can be assumed as a Byte value of ...read more
Java
Java - util package
Java-Functions
Java-Scanner
Scanner hasNextLong() method in Java with Examples
Last Updated: 17 November 2022
The hasNextLong() method of java.util.Scanner class returns true if the next token in this scanner's input can be assumed as a Long value of ...read more
Java
Java - util package
Java-Functions
Java-Scanner
Scanner hasNextShort() method in Java with Examples
Last Updated: 17 November 2022
The hasNextShort() method of java.util.Scanner class returns true if the next token in this scanner's input can be assumed as a short value ...read more
Java
Java - util package
Java-Functions
Java-Scanner
Scanner Class in Java
Last Updated: 11 April 2025
In Java, the Scanner class is present in the java.util package is used to obtain input for primitive types like int, double, etc., and strin...read more
image
Java
Java-I/O
Java-Scanner
1
1
1
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox