Driver code
public static void main ( String [ ] args ) { String input = " Geeks ▁ For ▁ Geeks ▁ " ; GFG gfg = new GFG ( ) ; System . out . println ( " The ▁ length ▁ of ▁ last ▁ word ▁ is ▁ " + gfg . lengthOfLastWord ( input ) ) ; } }