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
Biology,
5 months ago
Hindi,
5 months ago
Environmental Sciences,
10 months ago
Math,
10 months ago
Chemistry,
1 year ago