aabccdee
Find the used alphabets as abcde ?

Answer Posted / adarsh

Scanner sc=new Scanner(system.in);
Int i,j=0;
String S1=sc.next(),s2;
S2=s1charAt(0);
For(i=1;i<s1.length;i++)
{
If(s2.charAt(j).equals (s1.charAt(i))
Continue;
Else{
S2=s2.concat(s1.charAt(i));
j++;
}
}
Sop(j);
}


I m writing with my mobile phone so chuck the mistakes like upercase nd lowr case...

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the string method compareto () do?

541


How many bits is a double?

534


What does i ++ mean in Java?

507


What do you mean by Hash Map and Hash Table?

606


What is composition in java?

730






What is the purpose of the system class in java programming?

549


How do you calculate square roots?

581


What is collections framework?

582


Is a method a function?

559


What are voids?

543


What do bitwise operators do?

533


What is jvm? How its run?

666


Is it possible to use string in the switch case?

561


Why synchronization is important in java?

572


What is java full form?

538