charAt() is a method in the String to get the particular character in a String, whereas contains() is a method in the java String to check whether the given value is present or not and it prints in Boolean Value ie.(true, false)