Tag Archives: String 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 […]

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”; […]

replace( char oldch, char newch) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

replace( char oldch, char newch)  in JAVA – JAVA 10th Class notes – ICSE JAVA Notes   replace( char oldch, char newch) : replace( char oldch, char newch) function replaces all the occurrences of the specified old character with the new character within the given String.   Syntax : String res=str.replace (oldch, newch);   Example : […]

ToUpperCase in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

ToUpperCase  in JAVA – JAVA 10th Class notes – ICSE JAVA Notes   toUpperCase( ) : toUpperCase( ) function will convert all the characters of the String to Upper Case. If any character is in Upper Case or it is a Special Character, then it will remain the same.   Syntax : String res = […]

Length in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

Length  in JAVA – JAVA 10th Class notes – ICSE JAVA Notes length() : length() function is used to find the length of the String, that is the number of characters present in the String. It returns a Integer Value, as length is a integer number. Syntax : int var = str.length(); Example : String […]

Character is LastIndexOf (char ch) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

Character is LastIndexOf (char ch) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes lastIndexOf(Char ch) : lastIndexOf(Char ch) function returns the Index of the last occurrence of the specified character within the String. It returns a Integer Value. Syntax : int var = str.lastIndexOf(ch); Example : String str= “JAVA”; int res=str. lastIndexOf […]

Character is indexOf (char ch) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

Character is indexOf (char ch) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes   indexOf(char ch) : indexOf(char ch) function returns the Index of the first occurrence of the specified character within the String. It returns a Integer Value. Syntax : int var = str.indexOf(ch); Example : String str= “JAVA”; int res=str.indexOf(‘A’); […]

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 equals (String str) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes

Character is equals (String str) in JAVA – JAVA 10th Class notes – ICSE JAVA Notes equals(String str) : equals(String str) function is used to compare two strings together to check whether they are identical or not. It returns a Boolean type value. The equals() function is Case Sensitive, which means that ‘COMPUTER’ written in […]

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 = “ […]