View Feed
Java Developers
Community of Java Developers: Get Java Programming Help from fellow Java Developers across the world.
599 Members
Join this group to post and comment.
drl0l1515 • Jul 23, 2009

JAVA:Reading from keborad stream (not using console)

hey @ first, I just found this forum via google, got me AGAIN somhing witch i didnt wan 😡. So i hoped I may ask...

I 1st semester in IT University, I have been doing lots of programing (for fun, to make it easyer to work, etc etc.)
Most I found on Java api and google, but I cant fin any way to reat stuff directly from the keyboard.

Example: I wanted to make a program witch does NOT need the console to get a imput over it (neather *.txt files).

For instance ( in a main class):
import java.util.Scanner;


Scanner sc = new Scanner(System in);

with that i can read stuff from the console and output it on the console.
So does anybody know how to make that work if i make/run a program and just write it in when i have a other (or none) window in front of me?

I hope I managed to explain what my propem is, and I hope u guys can help me. thx
faizaan • Jul 25, 2009

i hope you will get your answer if you read about

character stream and byte stream from any book.

Share this content on your social channels -