"Sun Certified Java Programmer" This is one String , we need
to print SCJP, write the java code dynamically? pls reply
this questions

Answer Posted / sreekanth madamanchi

public class Sample {
public static void main(String args[]) {
String str = "Sun Certified Java Programmer";
String str2 = null;
for(int i=0;i<str.length();i++)
{
char c = str.charAt(i);
if(Character.isUpperCase(c))
{
if(str2 == null || str2 == "")
str2 = ""+str.charAt(i);
else
str2 = str2+str.charAt(i);
}
}
System.out.println("Result="+str2);
}
}

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi we have an urgent requirement for Java/J2ee technical lead position & also looking for "Java Guidewire claimcentre" experienced professional for Bangalore location if interested can reach srisanh@gmail.com

2729


What are the interfaces in java collections? : java collections

826


What are maps interfaces in the java collections? : java collections

756


Which sorting algorithm is used by collections.sort() in java ?

718


What are the different types of classes implemented in the set interfaces? : java collections

805






What are the types of the main implementing classes in the map interfaces? : java collections

819


Which java collection class can be used to maintain the entries in the order in which they were last accessed?

754


What are the considerations to be made in case of loops in java ?

764


Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword

1788


what is mean by hasing and maping in java platform and advantage?

2062


can u draw class/object diagram for ATM

5748


What is the use of the list interface in the java collection? : java collections

777


What are the different types of features of the java collections framework? : java collections

790


What is the difference between comparable and comparator in java.util pkg?

786


What are the different types of ways where you can iterate over a list? : java collections

740