unknown unknown -3 years ago 139
Java Question

How to print the console value in my Eclipse?

My Application is in some other folder, I call that function, the output is printed in my console.

How can I get the value from the console?

Answer Source

I'm not sure if I understand the question. However, you can use this code snippet to get line of text from console (it also works in Eclipse):

String val = new BufferedReader(new InputStreamReader(System.in)).readLine();
System.out.println("val = " + val);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download