wap to accept a sentence and display only the word having even number of characters
Answers
Answered by
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