Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
|
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 6th, 2007, 01:09 PM
Authorized User
 
Join Date: Jan 2007
Posts: 46
Thanks: 2
Thanked 1 Time in 1 Post
Default Reading Console Input

Could somone tell me how one can read input from a keyboard in java.I like to know what are the input statements.Give me examples please like for String,Integer,Float,Double, etc.

Thankyou!


__________________
MAXOOD!

Life is an endless journey towards perfection
 
Old January 14th, 2007, 07:19 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Scanner kb=new Scanner(System.in);
Integer.parseInt(kb.nextline());// or readline() please see Scanner class for name

Best Regards,
Francesco Andrio
 
Old February 13th, 2007, 06:18 AM
Registered User
 
Join Date: Feb 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        br.readLine();

 
Old February 13th, 2007, 07:03 AM
Registered User
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sir, Plz tell me clearly that why JAVA is not pure object oriented ?
It's urgent ?

raj
 
Old February 14th, 2007, 09:08 AM
Friend of Wrox
 
Join Date: Dec 2003
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Because some of its types (eg. int, char, float, double) are not Objects.

--
Charlie Harvey's website - linux, perl, java, anarchism and punk rock: http://charlieharvey.org.uk





Similar Threads
Thread Thread Starter Forum Replies Last Post
Asynchronous reading to console+StreamReader aashish23 C# 1 September 5th, 2007 04:16 AM
Reading an integer from the console meghaljani Visual C++ 2005 0 September 1st, 2007 11:09 AM
Reading input from files PROLOG Ruman29 Other Programming Languages 0 March 8th, 2007 12:49 PM
reading a row of characters from an input file Omega_st1 C++ Programming 4 October 28th, 2003 01:35 AM
Reading string data from an input file Omega_st1 Visual C++ 0 October 15th, 2003 05:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.