Ask Questions?

View Latest Questions

Advertisement


 
 

Exercise - Delete Blanks
Posted on: July 26, 2006 at 12:00 AM
Write a method to delete all blanks from its parameter.

Java: Exercise - Delete Blanks

Write a method to delete all blanks from its parameter. The method signature is
   public static String deblank(String s);
   

Sample output

   deblank("abc") returns "abc" (ie, no changes)
   deblank("I'm feeling fine.") returns "I'mfeelingfine."
   
Delete Blanks - Solution
Copyleft 2003 Fred Swartz MIT License, Last update: 2003-11-23
Advertisement


DMCA.com