I am wondering which is the best way to go with java code. I need to create a class with simple prompts for input.. I have tried using both classes and cannot work out the particular benefits for each. Is this because I am still in the early stages of programming or are there situations that will occur as it becomes more complex?? import java.util.Scanner;public class myClass{    Scanner stdin = new Scanner(System.in);    public String getInput(String prompt)      {        System.out.print(prompt);        return stdin.nextLine();    }}... orimport java.io.*;public class myClass{    public static void main(String[] args) throws IOException    {        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));        System.out.print(Input something: );        String name = stdin.readLine();    }}I know these examples are showing different methods within these classes, but thought this might serve well for the discussion.I'm really not sure which site is the best to ask this on.
The better way to ask for input?
java
I've been a Java programmer for 6 years now, and I rarely have to worry about how to read input from the command line.  Most times, when I'm dealing with input and output, they are usually streams of some sort and therefore using a BufferedReader is generally a best practice, since it takes the bottleneck off having to read a file line by line.However, for what you're out to do, using System.in with Scanner is perfectly fine.  Lets just say that if I wanted to handle large amounts of input, perhaps I would wrap System.in with a BufferedInputStream for efficiency, but if your program is waiting on you, then there is no advantage gained.