Computer Science, asked by beherasjsatya, 1 year ago

wap to accept a sentence and display only the word having even number of characters

Answers

Answered by utkarshmishra9819
1

Answer:

class prog{

void main(String a)

{StringTokenizer ab=new StringTokenizer();

int c=ab.countTokens();

for(int i=1;i<=c;i++)

{

String n=ab.nextToken();

if(((n.length())%2)==0)

{

System.out.println(n);

}}}}

Similar questions