Driver program to test above functions
public static void main ( String args [ ] ) { String str = "One twothree four five "; System . out . println ( " No ▁ of ▁ words ▁ : ▁ " + countWords ( str ) ) ; } }