Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  

Buffered Reader..



Share on Google+Share on Google+

Buffered Reader..
1 Answer(s)      8 years ago
Posted in : Java Beginners
View Answers

December 29, 2008 at 5:21 AM

Hi friend,

import java.lang.*;

public class CompareString{
public static void main(String[] args) throws IOException{
System.out.println("String are equal and not equals");
BufferedReader item = new BufferedReader(new InputStreamReader(;
System.out.print("Enter First String:");
String item1=item.readLine();
System.out.print("Enter Second String:");
String item2=item.readLine();
char c1=item1.charAt(0);
char c2=item2.charAt(0);
char c3=item1.charAt(1);
char c4=item2.charAt(1);

if( item1.equals(item2)){
System.out.println("The given string is equals.");
System.out.println("The given String is not equals.");

Visit for more information.



Related Tutorials/Questions & Answers:
Buffered Reader.. - Java Beginners
Buffered Reader..  Hi Friend doubt On BufferedReader bf=new BufferedReader(new InputStreamReader(; CAN u Please Explain the (Every Word) Above Statement in Detail.... BufferedReader => InputStreamReader
Java Buffered Reader
Java Buffered Reader  Here's a brief desc of what my Java code does .. I'm using BufferedReader to read lines from a text files and split each line based on a predefined size... Eg : If the 1st line of the text file
JSP Buffered Reader
JSP Buffered Reader          JSP Buffered Reader allows the user... an example from 'JSP Buffered Reader'. To grasp and understand the example we create
Barcode reader
Barcode reader  hi all, i wont to operation in the out put from Barcode reader. dose java support Barcode reader`s result
Java I/O Buffered Streams
Java I/O Buffered Streams In this section we will discuss the I/O Buffered... triggering of disk access, network activity and other relative operations. Buffered : In a buffered way of programming read and write operations are done through
Gobits Reader
Gobits Reader       Gobits Reader is a lightweight, web-based news reader on steroids, combined with a powerful blog creator. They are also supplying a built-in webmail that is one
PDF reader in android - JavaMail
PDF reader in android  Hi, iam trying to open and perform basic operations on PDF file in android. But i unable to get it. IS there any possibilities to solve that problem? Waiting for reply
barcode reader using jsp
barcode reader using jsp  HI ALL, I need jsp code for barcode reader.When we scan the barcode image that barcode value will be stored in one textbox automatically. please helpe me. Regards Bhanu
Java file byte reader
Java file byte reader  I am looking for an example program in Java for reading the bytes. More specifically I need java file byte reader example code. Thanks   For complete details read the following tutorials: Java
com.pixelmed.dicom.DicomException: No reader for jpeg-lossless available
com.pixelmed.dicom.DicomException: No reader for jpeg-lossless available   com.pixelmed.dicom.DicomException: No reader for jpeg-lossless available
Java IO Reader
Java IO Reader In this section we will discuss about the Reader class in Java. Reader class is an abstract class in package provided for reading.... This class can not be instantiated directly. Constructor of Reader
barcode reader using java script
barcode reader using java script  Hai all, I need code for one application in java and java script my requirement is, Scanning data directly into a field is the easiest of all implementations. The cursor is placed
How to convet reader to double? - Java Beginners
How to convet reader to double?  I have this set of coding which read the input from the com1 port. I wan to ask how to convert the input (the reader.../a")) { SimpleRead reader = new SimpleRead
URL Connection Reader
URL Connection Reader       In this section, you will learn about the url connection reader. Here, first of all we are going to define class named "
Show Image Reader and Image Writer by MIME Type
Show Image Reader and Image Writer by MIME Type... the Image Reader and Image Writer by by MIME Type.  To show the image reader and image writer by MIME Type, we have used ImageIO class of the package
Show Image Reader and Image Writer by image format
Show Image Reader and Image Writer by image format... to display the Image Reader and Image Writer by the image format.  To show the image reader and image writer, we have used ImageIO class of the package
Mobile RMS Reader 0.5.1
Mobile RMS Reader 0.5.1     ...:// ...-rms-reader/index.htm        
Java file line reader
Java file line reader In this section, you will learn how to read a particular line from file. Sometimes you want to read a particular line from the file but you have to read the whole file for this process. So in order to remove
File Reader example in JRuby
File Reader example in JRuby       In this section of JRuby tutorial we will study to Read File in JRuby. We can read and write file on the console 
Line Number Reader Example
Line Number Reader Example       In this example we are reading  number of lines. In this example we are reading a file from system .Then we are reading number
Hibernate Annotations
part. The reader must have hands on experience before starting
RSS View
RSS View       RSS View is a news reader for RSS and Atom feeds designed to integrate into the Eclipse workspace. Eclipse Plugin: ExploreFS ExploreFSExploreFS
PHP Ajax Book
and efficient resource a reader can get to enter the exciting world of AJAX.../ajax/grid/ Chapter 9: AJAX RSS Reader uses the SimpleXML PHP library, XML and XSLT, to build a simple RSS aggregator. View AJAX RSS Reader Demo here: http
Parsing The XML File Using JDOM Parser in JSP
from files, network sockets, strings, or from reader. JDOM does not has its own... build() method to build a document object from a reader, InputStream, URL, File
Java Beans Books
Java Beans Books         Java Beans book review The book opens with a high-level look at component software, introducing the reader
Reading string from file timed
Reading string from file timed  So I want to make a file reader/ buffered reader that reads a new line of the textfile, lets say every 30 second. Like it reads the first line, waiting 30 seconds, read the next line and so one
from textfile to textfield
you make it that I would be using buffered reader instead of scanner. I think buffered reader is a bit advanced than using scanner
Example to show exception handling in java
= new BufferedReader(new FileReader("girish")):-Buffered reader is a class that reads text from a character-input stream. Here we are creating Buffered reader which generally read request made of a Reader. String s = 
Java programming: generating series
Java programming: generating series  Write a program to accept a string using buffered reader and replace character sequence 'cat' with 'dog'   Here is a java code that accept the string from the user using
java programmming: string manipulation
java programmming: string manipulation  WAP to accept a string from the user, using buffered reader and then find the frequency of character 'e' occurring in it   Here is a java example that reads a string from