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
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
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
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
Java Spring Hibernate Struts Training What does core Java include? java What are some way to learn Java quickly? Is it required to learn Java before learning Java Script? Is it necessary to learn java script before learning PHP? Are HTML5 and Java Script boosts Java career? Is Java object oriented? Fingerprint application with Java Uninstall Oracle Virtual Box JSON to HashMap Free Java online Training I want example of Control Statement in Java ANSI Color Codes with Python Create a Program that Calculates Input What is difference between JDK,JRE and JVM? How to see ubuntu version on server? How to get Page Source in Selenium (WebDriver) using Java? The path to the driver executable must be set by the webdriver.gecko.driver system property parse data from a link in java Java Program Qns using BlueJ How to fix HAX Kernel Module Is Not Installed error? Installing Audacity Looking for code Logic to check track changes & Coments in MSWord, MSWordx, MSExcel, MSExcelx is ON/OFF Installing JDK on Mac SAX Parser exception ERROR 601 (42P00): Syntax error. Encountered Thread java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory How to install Ubuntu 16.04 LTS? HttpServletRequest cannot be resolved to a type in eclipse - Solved Unhandled event loop exception GC overhead limit exceeded Spring Data jpa with apache phoenix Caused by: java.lang.IllegalArgumentException: Not a host:port pair: PBUF o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum= com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager class not found com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager not found How to download and install Java 8 on Windows? How to uninstall JDK 7? How to install gtk-doc-tools package in Ubuntu? How to install Oracle JDK 8 on Ubuntu? ejabberd_ctl.beam not found - Solved How to convert date to UTC format in Java? How to install autoconf, automake and libtool in Ubuntu 15.10? How to convert current date to mm dd yyyy format in Java? How to convert current date to dd mm yyyy format in Java? How to stop window closing in "internalFrameClosing" event. How to find list of all index in Neo4j? file location SASLError using PLAIN: not-authorized how to convert war file into .exe file using java code


Advertisement null