It is the only abstract interface in the java.lang package. It is the basic interface containing non-implemented methods all regarding and involving characters only like length() , charAt() etc and a special method i.e toString() method. It is the super class of many of the classes and interfaces, which are shown below.

Implementation class for the abstract method declared in the in the CharSequence interface are:-

AbstractStringBuilder (c)   of [ java.lang package ]

String (c)                             of [ java.lang package ]

StringBuffer (c)                   of [ java.lang package ]

StringBuilder (c)                 of [ java.lang package ]

CharBuffer (c)                     of [ java.nio package ]

Segment (c)                         of [ javax.swing.text package ]

Note : (c) represent the class. All the above mentioned names are java class.


Methods of the CharSequence interface :

public abstract int length();

public abstract char charAt(int i);

public abstract CharSequence subSequence(int i, int j);

public abstract String toString();


Some of the important points of CharSequence interface :

* It was first introduced with the release of JDK 1.4.
* CharSequence is originally is the sequence of character and which combines to form a String only,
so we can call a string as the CharSequence.

Related Posts:

  • Program to print a simple text in java After installing java and setting the path for it now its turn to have some fun with codes. Now i am going to tell you how to print your text in java. Its a very simple program and basically for beginners. There are some im… Read More
  • How and Why to use main() method in java? In this post i will tell you something interesting about main() method in java. Like What is the use of main() method? How we are going to use main() method? Why we are using main() method in our java program? You will find… Read More
  • Setting CLASSPATH in Java and configure it in windows ! Setting PATH and CLASSPATH are two different task in Java. Let me make you more clear about PATH setting and CLASSPATH setting in Java. If you had missed your lectures on PATH setting then this post will make you clear vi… Read More
  • Introduction to Java Like all other programming language it is also a well known programming language basically designed for web application . As we all know that c++ is an objected oriented language but not fully object oriented, an attempt mad… Read More
  • Show Programmatically that String is immutable ? This is one of the common question to be asked in interview to judge your basic level of knowledge. We all know that String is immutable which means that once object created cannot be modified or if try to modify, it will… Read More

1 comment:

Ads 468x60px

.

Ads

.

Featured Posts

Popular Posts

Like Us On FaceBook

Total Pageviews

201978

Online Members

Live Traffic