whats the pupose of " .readline" and where we suppose to use it? please help me,im still amateur in this subject
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
whats the pupose of " .readline" and where we suppose to use it? please help me,im still amateur in this subject
Where did you see that: .readline? It is not valid java as you have coded it.
There is a method with a similar name in the Java SE. To see where it is used, look in the Java SE API doc at this link: Java Platform SE 7
At the top of the page is a link: Index that goes to a page where you can look up all the methods used in Java SE. Click on the R to get the pages of methods that start with R and then scroll down to readline
If you don't understand my answer, don't ignore it, ask a question.
To say in simple, it is the Method to read the Input Using the InputStream Class Object
For example,
DataInputStream dis=new DataInputStream(System.in);
dis.readLine(args[0]);
here args[0] is the first input through Console.
every method begins with small letter. If it seems to be continuous 2 word, then the second word must be Capital Letter. Here in readLine(), "L"ine.. not readLine()
Thank you
@vigneshwaran
Did you compile and execute the code you posted?
Try to test your code before posting it. The posted code has MANY errors.
If you don't understand my answer, don't ignore it, ask a question.