hi,
i just wrote my first java program, it compiles and runs and all, but the console window closes too quickly u can hardly see the output.
how can i rectify that?
NewToJava 0 Newbie Poster
Recommended Answers
Jump to Postfirst better way... is try to run programs in command prompt thats is the best way to start a learning step for java
install jdk 1.5 or latest 1.6
then set your class path
compile it
javac programname.java
and runjava programname
…
Jump to Postuse the following at the end of your code
BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in.readLine();
it will pause your command prompt and wait for an input.
All 6 Replies
darkagn 315 Veteran Poster Featured Poster
NewToJava 0 Newbie Poster
darkagn 315 Veteran Poster Featured Poster
NewToJava 0 Newbie Poster
vinod_javas 65 Practically a Posting Shark
Fungus1487 55 Posting Pro in Training
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.