Java string Methods

string functions
charAt()Char at given position of the string
codePointAt()Unicode vlaue of Char at given position of the string
codePointBefore()Unicode vlaue of Char at before the given position of the string
codePointCount()Number of Unicode chars inside a range of a string
compareTo()Case sensitive string comparison
compareToIgnoreCase()Case insensitive string comparison
concat()Case sensitive string comparison
contains()Check if string contains a sequence of chars
copyValueOf()Returns string by using chars of char array
endsWith()Check the string ending with input string or not
equals()Check if two strings are equal or not ( case sensitive)
equalsIgnoreCase()Check if two strings are equal or not
format()Formatting string outputs
getBytes()Creates a byte array by using sequence of bytes used in string
getChars()Copy range of chars of a string
hashCode()Creates hash code of the string
indexOf()position of a matching string or char from left
intern()string intern to get instance of memory
isEmpty()check string if it is empty or not
lastIndexOf()position of a matching string or char from right
length()Length of the string
replace()Replace all occurrence of string or char
replaceAll()regular expression string replacement
replaceFirst()Replace first occurrence of string or char
startsWith()Check the string starting with input string or not
split()Breaking a string with delimiters
substring()Part of the string with start and end positions
toCharArray()char Array from the input string
toUpperCase()Converts all lowercase char to uppercase
toLowerCase()Converts all Uppercase char to lowercase
trim()Removing space from left and right side of the string
join()Concatenates the string elements by using a delimiter
valueOf()Converting any type to String

Java Tutorials Reading different types of inputs from user


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2022 All rights reserved worldwide Privacy Policy Disclaimer