Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

how to delete a letter in a word?

Ads

 
 

Share on Google+Share on Google+

ASHUTOSH PRADHAN
how to delete a letter in a word?
1 Answer(s)      6 years and 4 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.

Ads
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);
    }
}

Ads