Skip to main content

Read or input form user in Java using BufferedReader

 BufferedReader use to read text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.The buffer size may be specified, or the default size may be used. The default is large enough for most purposes.
In Java  BufferedReader is a efficient method to read an input. Here given a short example to read a string from user and print it:



package palindrome;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class  inputExample  {

    public static void main(String[] args) throws Exception {

   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String s = new String();
 
    s =br.readLine();
    System.out.println(s);
    }
}


Comments

  1. Hi, nice description about Read or input form user in Java using BufferedReader.Thanks for your help..

    -Aparna
    Theosoft

    ReplyDelete
  2. In java bufferreader is good method to read an input.Your example gives a clear idea about java.Always keeping like this.
    Regards,
    Java Training in chennai | Java course in chennai

    ReplyDelete
  3. Very nice write-up. I absolutely appreciate this website. Thanks!
    Free Digital Marketing Courses
    latestgadgets

    ReplyDelete
  4. This is the awesome post and I have huge information from your creative blog. The admin presented the content is very interesting and also comprehensive. Thank you for your sharing, Keep updating...
    Oracle Training in Chennai
    Oracle Training institute in chennai
    Tableau Training in Chennai
    Spark Training in Chennai
    Unix Training in Chennai
    Power BI Training in Chennai
    Oracle DBA Training in Chennai
    Oracle Training in Chennai
    Oracle Training institute in chennai

    ReplyDelete
  5. Did you hear there's a 12 word phrase you can speak to your crush... that will trigger intense feelings of love and instinctual attractiveness for you buried inside his heart?

    Because hidden in these 12 words is a "secret signal" that fuels a man's impulse to love, worship and look after you with all his heart...

    12 Words Who Fuel A Man's Desire Instinct

    This impulse is so built-in to a man's mind that it will make him try harder than before to do his best at looking after your relationship.

    In fact, fueling this powerful impulse is so essential to getting the best possible relationship with your man that once you send your man a "Secret Signal"...

    ...You will instantly find him expose his mind and heart for you in a way he never experienced before and he will identify you as the only woman in the world who has ever truly understood him.

    ReplyDelete
  6. Great content thanks for sharing this informative blog which provided me technical information keep posting.
    Artificial Intelligence Training
    Java Training
    AWS Training
    Machine Learning Training
    Data Science Training
    DevOps Training

    ReplyDelete
  7. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites!
    DevOps Training in Chennai

    DevOps Online Training in Chennai

    DevOps Training in Bangalore

    DevOps Training in Hyderabad

    DevOps Training in Coimbatore

    DevOps Training

    DevOps Online Training

    ReplyDelete
  8. Excellent Blog! I would Thanks for sharing this wonderful content.its very useful to us.I gained many unknown information, the way you have clearly explained is really fantastic.keep posting such useful information.thanks!!!

    Java training in Chennai

    Java Online training in Chennai

    Java Course in Chennai

    Best JAVA Training Institutes in Chennai

    Java training in Bangalore

    Java training in Hyderabad

    Java Training in Coimbatore

    Java Training

    Java Online Training

    ReplyDelete
  9. This is the awesome post and I have huge information from your creative blog. The admin presented the content is very interesting.
    acte reviews

    acte velachery reviews

    acte tambaram reviews

    acte anna nagar reviews

    acte porur reviews

    acte omr reviews

    acte chennai reviews

    acte student reviews

    ReplyDelete
  10. After seeing your article I want to say that the presentation is very good and also a well-written article with some very good information which is very useful for the readers....thanks for sharing it and do share more posts like this.

    python training in bangalore

    python training in hyderabad

    python online training

    python training

    python flask training

    python flask online training

    python training in coimbatore
    python training in chennai

    python course in chennai

    python online training in chennai

    ReplyDelete
  11. Web development is definitely not going to die. It industry is moving to other areas such as IoT, automotive, wearables, etc. Maybe it seems like IT industry is moving from web development to other industries, but actually IT industry is just expanding in all areas. Web Development is not dying.thanks lot!!

    Android Training in Chennai

    Android Online Training in Chennai

    Android Training in Bangalore

    Android Training in Hyderabad

    Android Training in Coimbatore

    Android Training

    Android Online Training


    ReplyDelete
  12. This post is so useful and informative. Keep updating with more information.....
    Angularjs Training in Bangalore
    Angular Training In Bangalore

    ReplyDelete
  13. This post is so useful and informative. Keep updating with more information.....
    Swift Language Code
    IOS App Development

    ReplyDelete
  14. The strategy you have posted on this technology hepled me to get into the next level and had lot of informations in it. Python is one of the basic level programming and is very important one. python course in pune

    ReplyDelete

Post a Comment

Give your valuable Comment...

Popular posts from this blog

Object-Oriented Programming and JAVA Programming Language

  Object-Oriented Programming and:   Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction, encapsulation, messaging, modularity, olymorphism, and inheritance. Many modern programming languages now support OOP, at least as an option. JAVA Programming Language: Object-oriented programming is at the core of Java. In fact, all Java programs are object-oriented, this isn’t an option the way that it is in C++, for example. OOP is so integral to Java that you must understand its basic principles before you can write even simple Java programs. Therefore, this chapter begins with a discussion of the theoretical aspects of OOP.

Absolute value and Floating-point absolute value function in C Programming Language

Absolute value function in C Programming Language is abs(i), Its return the absolute valu of i. where  i  is any positive or negative  number. It is integer type function. The include file of abs(i) is stslib.h Observe under program: #include<stdio.h> #include<stdlib.h> int main(void) { int a; scanf("%d",&a); printf("%d",abs(a)); } Here I use a integer number. Input it by scanf and print the Absolute value by abs() function. Floating-point Absolute value function in C Programming Language is fabs(i), Its return the absolute valu of i. where  i  is any positive or negative  Floating-point number. It is double integer type function. The include file of fabs(i) is math.h Observe under program: #include<stdio.h> #include<stdlib.h>  int main(void) { float a; scanf("%f",&a); printf("%.2f",fabs(a)); } Here I use a integer number. Input it by scanf and print the Floating-point Absolute value b