Skip to content

Java causing problem in input using scanner #7

@musawershah1598

Description

@musawershah1598

When ever i run the code with below command having scanner in code.
java Hello < input.txt
My input file have all the inputs specify for each scanner it giving me the following error.
Exception in thread "main" java.util.NoSuchElementException: No line found at java.base/java.util.Scanner.nextLine(Scanner.java:1651) at Example.main(Example.java:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions