Sign Up

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

Have an account? Sign In
Continue with Google
or use


Have an account? Sign In Now

Sign In

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

Sign Up Here
Continue with Google
or use

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.

Continue with Google
or use

Forgot Password?

Need An Account, Sign Up Here

You must login to ask a question.

Continue with Google
or use

Forgot Password?

Need An Account, Sign Up Here

Sorry, you do not have permission to add post.

Continue with Google
or use

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.

Oraask Logo Oraask Logo
Sign InSign Up

Oraask

  • Write
    • Add A New Post
    • Ask A Question

Oraask Navigation

Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Dev Tools
    • Online Compiler
    • Base64 Converter
    • Oraask XML Formatter
    • Oraask JSON Formatter
  • Wiki
    • SQL Tutorials
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials

isouravghosh

Juniorisouravghosh
Ask isouravghosh
118 Visits
3 Followers
0 Questions
Home/ isouravghosh/Best Answers
  • About
  • Questions
  • Answers
  • Best Answers
  • Posts
  • Polls
  • Asked Questions
  • Followed
  • Favorites
  • Comments
  • Followers Questions
  • Followers Answers
  • Followers Posts
  • Followers Comments
  1. Asked: May 5, 2020In: Java

    How to get input in java?

    isouravghosh
    isouravghosh Junior isouravghosh
    Added an answer on January 26, 2021 at 10:01 pm

    In Java the Scanner class allows the user to take input from the console. It belongs to the java.util package.It is used to read the input of primitive types like int, double, long, short, float, and byte. You can use this example below to understand the way the Scanner class helps to take input froRead more

    In Java the Scanner class allows the user to take input from the console. It belongs to the java.util package.It is used to read the input of primitive types like int, double, long, short, float, and byte.

    You can use this example below to understand the way the Scanner class helps to take input from the user

    import java.util.*;
    class UserInputDemo1
    {
    public static void main(String[] args)
    {
    Scanner sc= new Scanner(System.in); //System.in is a standard input stream
    System.out.print(“Enter your name: “);
    String str= sc.nextLine(); //reads string
    System.out.print(“Your name is : “+str);
    }
    }
    Output :
    Your name is : Sourav //In this case I have taken Input as Sourav so it is printing in the console as Your name is : Sourav

    See less
      • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp

Sidebar

Adv 250x250

Explore

  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Dev Tools
    • Online Compiler
    • Base64 Converter
    • Oraask XML Formatter
    • Oraask JSON Formatter
  • Wiki
    • SQL Tutorials
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials

Footer

Oraask

About

Oraask is a website for developers and software engineers who want to learn new skills, share their knowledge, and solve their coding problems. Oraask provides free content on various programming languages and topics, such as Oracle, Python, Java, etc. Oraask also allows users to ask questions and get answers from other members of the community.

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy
  • Terms & Conditions

Follow

Oraask is licensed under CC BY-NC-SA 4.0Oraask CopyrightOraask CopyrightOraask CopyrightOraask Copyright

© 2019 Oraask. All Rights Reserved
With Love by Oraask.