public class Answer implements QuestionInterface
{
@Override
public char func (String s){
char[] ch=s.toCharArray();
int i,j;
char b = 0;
for(i=0;i<s.length();i++)
{
for(j=i+1;j<s.length();j++)
{
if(ch[j]==ch[i])
{
b=ch[j];
break;
}
}
}
return b;
}
}
{
@Override
public char func (String s){
char[] ch=s.toCharArray();
int i,j;
char b = 0;
for(i=0;i<s.length();i++)
{
for(j=i+1;j<s.length();j++)
{
if(ch[j]==ch[i])
{
b=ch[j];
break;
}
}
}
return b;
}
}
Very nice program
ReplyDeleteGood..try
ReplyDeleteGood
ReplyDeleteReally nice
ReplyDeleteIts nice
ReplyDeleteIts nice
ReplyDelete