Driver Function to test other function
public static void main ( String [ ] args ) { GFG gfg = new GFG ( ) ; String [ ] input = { " geeksforgeeks " , " geeks " , " geek " , " geezer " } ; System . out . println ( " The ▁ longest ▁ Common ▁ Prefix ▁ is ▁ : ▁ " + gfg . longestCommonPrefix ( input ) ) ; } }