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 6955087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:41:28+00:00 2026-05-27T14:41:28+00:00

I was wondering how can I make a scanner in java that will read

  • 0

I was wondering how can I make a scanner in java that will read a line that you input. For example:

package first.test;
import java.util.Scanner;

public class FirstTest {

    public static void main(String[] args) {        
        Scanner input = new Scanner(System.in);
        int binaryout;

        System.out.println("This converts base 10 numbers to binary numbers.");
        System.out.println("Please enter your Base 10 Number:");
        //I WANT THE INPUT TO GO HERE!!!!!!!!

       }
}

Any help would be great!

EDIT: Well, looking back at this question, the answer is blatantly obvious, do a google search. yes i did, but the problem is that i was such a noob, i couldnt modify or apply ideas to my projects. sorry for the inconvenience. if there are any ideas on how to edit the question to make it relevant, that would be great. because its just so bad, i dont know how.

  • 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-05-27T14:41:29+00:00Added an answer on May 27, 2026 at 2:41 pm

    I believe you’re looking for input.nextLine();? Or if you know it’s base 10 then input.nextInt() or if it’s longer input.nextLong(). In the future your best starting place is the java documentation especially since you already knew the class that you were trying to make use of. If you look at the docs for Scanner (and maybe search the page for ‘line’) you’ll find what you were looking for:

    https://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html#nextLine()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wondering if there is a module-wide destructor such that we can make
i was wondering how i can make my app display that notification number next
I was wondering how I can make a simple bar chart that perhaps has
I was wondering how can I make an path file in php? For example
I was wondering how I can make a GUI that looks like Media Center,
Just wondering how I can make my app open automatically at login, but make
I was wondering how I can make a script load powerpoint file, advance slides
I was wondering how does Nike website make the change you can see when
I was wondering how can I make the IO faster by writing and reading
I was always wondering how I can make a function which calculates the power

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.