Tag Archives: Java String

DIFFERENCE BETWEEN STRING AND STRING BUFFER in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

DIFFERENCE BETWEEN STRING AND STRING BUFFER in JAVA – JAVA 10th Class notes – ICSE JAVA Notes     DIFFERENCE BETWEEN STRING AND STRING BUFFER :   String String Buffer String type Object has fixed Length String Buffer type object has provisions to change the length. New object is created to produce the change. Change […]

STRING BUFFER FUNCTIONS in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

STRING BUFFER FUNCTIONS in  JAVA – JAVA 10th Class notes – ICSE JAVA Notes STRING BUFFER FUNCTIONS : Some of the StringBuffer functions are as follows :   S.No. String Buffer Functions append(x ) insert(offset, x) setCharAt(index,c) delete(beg, end) setLength(n) reverse( )  

String Buffer in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

String Buffer in  JAVA – JAVA 10th Class notes – ICSE JAVA Notes   STRING BUFFER : A StringBuffer object provides a string whose value can change. The String Buffer class is a part of the java.lang package. It is an alternative to the String class. A string buffer contains a memory block called a […]

toString() JAVA – JAVA 10th Class notes – ICSE JAVA Notes

toString() JAVA – JAVA 10th Class notes – ICSE JAVA Notes toString( ) : toString( ) function converts the primitive data type to the String type. This conversion is important to apply the string functions on digits of the numbers.   Integer type to String type Conversion : Syntax : String res = Integer.toString(int);   […]

substring(int beginindex, int endindex) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

substring(int beginindex, int endindex) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes substring(int beginindex, int endindex) : substring(int beginindex, int endindex) function is used to extract a part of the string. This extracted part of the main string is known as the Substring. Syntax : String var=str.substring(index); Example : String str= “COMPUTER”; […]

Character is equalsIgnore Case (String str) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

Character is equalsIgnore Case (String str) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes   equalsIgnoreCase(String str) : equalsIgnoreCase(String str) function is used to compare two strings together to check whether they are identical or not, by ignoring the Case. The equalsIgnoreCase() function is NOT Case Sensitive, which means that ‘COMPUTER’ written […]

Character is starts With (Stringstr str) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

Character is starts With (Stringstr str) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes   startsWith(String str) : startsWith(String str) function is used to check whether a given string has specified prefix or not. It returns a Boolean type value. Syntax : boolean b = str.startsWith(str_suffix); Example : String str = “ […]

Character is ends with (Stringstr str) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

Character is ends with (Stringstr str) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes   endsWith(String str) : endsWith(String str) function is used to check whether a given string has specified suffix or not. It returns a Boolean type value. Syntax : boolean b = str.endsWith(str_suffix); Example : String str = “ […]

Character is concat (Stringstr str) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

Character is concat (Stringstr str) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes   concat(String str) : concat(String str) function is applied to join two Strings. Syntax : String str = str1.concat(str2); Example : String str1 = “ Java”; String str2 = “ Programmer”; String str = str1.concat(str2); Output : Java Programmer […]

Character is compare To (Stringstr) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

Character is compare To (Stringstr) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes   compareTo(String str) : compareTo(String str) function compares two strings. It not only checks for the equality of the string but also checks whether one string is bigger or smaller than other or not. If the Strings are equal […]