HI,
I am studying java, and I am trying to input a value into, then It goes to a for loop.

I did the for loop part. but I am having a hard time on the input.

thanks

Here is good discussion. Please read thoroughly.

you want to give Input in command

1.javac example.java----compilation

2.java example "some input string"---the string within quote taken by main method as string args


else

getting pro grammatically...

write code

BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
    System.out.print("Enter a line:");
    System.out.println(stdin.readLine());
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.