Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8996205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:43:24+00:00 2026-06-15T23:43:24+00:00

I am having an issue, i need to scan different inputs that the user

  • 0

I am having an issue, i need to scan different inputs that the user will insert on the screen at the same time. For example i have a sort of a menu that is printed on the screen and the user will select if he wants to load a file and type the name of file.I have done this by asking the user to type load and after that asked him what file to load by I need it to be done at the same time. The user just types “load S.txt” and it selects the loads option and opens the file at the same time.My professor told me I am supposed to use token but I’m stuck.(in java) Thanks .

          private static void inspecting (){
    System.out.println("inspect word or byte?");
    Scanner input3 = new Scanner( System.in );
    String insp = input3.next();
    if(insp.equals("word")){
        System.out.println("select the adrress you want to inspect the value");
        Scanner input4 = new Scanner( System.in );
        int addr = input4.nextInt();

             what i need is the user to type "ispect word at adrress x" withou doing it step by step.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:43:25+00:00Added an answer on June 15, 2026 at 11:43 pm

    If I understand correctly your Scanner is breaking on spaces. You want it to break on new lines:

    Scanner scanner = new Scanner(System.in);
    scanner.useDelimiter(System.getProperty("line.separator")); // this scans for lines
    while (scanner.hasNext()) {
        String input = scanner.next();
        System.out.println(input); // take a look for yourself
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

new to phonegap programing development.having one issue that i need to authonticate user via
I'm having the same troubles with my program again. The issue this time is
Having some issue with Threadpooling here that I need some help with please. I
I am having a data conversion issue that need your help. My project is
Hi I am having an issue solving a problem that I need to resolve
I am having an issue where I need to be able to specify the
having the following XML sample document, I need to issue an XPath/XQuery expression to
I am having issues with ADO.NET 2.0 merging/importing data. I need to update/insert data
I having issue that content assistant / intellisense is working in methods such as
Hi guys I am having issue I have this query: SELECT * FROM useraccount

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.