ASHUTOSH PRADHAN
how to delete a letter in a word?
1 Answer(s)      4 years and 6 months ago
Posted in : Java Interview Questions

how to delete a letter in a word? for example if i enter= roseindia, i want to delete 's', then output= roeindia.

Advertisement
View Answers

March 12, 2011 at 11:20 AM


class RemoveLetterFromString{
    public static void main(String[] args){
        String str="roseindia";
        String newstring=str.replace("s","");
        System.out.println(newstring);
    }
}