package Good.com;
import
java.util.StringTokenizer;
public class Prog22 {
static String op;
public static void abc(String
str1, String str2) {
int max = 0;
String
n;
StringTokenizer
st = new StringTokenizer(str1, str2);
while
(st.hasMoreTokens()) {
n
= st.nextToken();
if (n.length()
> max) {
max
= n.length();
op = n;
}
}
}
public static void main(String[]
args) {
String
str1 = "delhi-pune-patna";
String
str2 = "-";
abc(str1,
str2);
System.out.println(op);
}
}