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

Answers were Sorted based on User's Feedback



"Sun Certified Java Programmer" This is one String , we need to print SCJP, write the jav..

Answer / 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

"Sun Certified Java Programmer" This is one String , we need to print SCJP, write the jav..

Answer / qamrun nisa

public class Sample {

public static void main(String args[]) {
String str = "Sun Certified Java Programmer";
StringTokenizer st = new StringTokenizer(str, " ");
while (st.hasMoreTokens()) {
String value = st.nextToken();
System.out.print(value.charAt(0));
}
}
}

Is This Answer Correct ?    5 Yes 0 No

"Sun Certified Java Programmer" This is one String , we need to print SCJP, write the jav..

Answer / rakesh kumar mishra

public class Sample
{
public static void main(String args[])
{
String str = "Sun Certified Java Programmer";
StringTokenizer st=new StringTokenizer(str," ");
while(st.hasMoreTokens())
{
String value=st.nextToken();
System.out.println(value.charAt(0));
}
}
}

Is This Answer Correct ?    6 Yes 2 No

"Sun Certified Java Programmer" This is one String , we need to print SCJP, write the jav..

Answer / karan

package test;
public class NewTest {

public static void main(String args[]) {

String[] strArr = strArr = "Sun Certified Java Programmer".split(" ");

System.out.println(strArr[0].charAt(0) + "" + strArr[1].charAt(0)+ "" + strArr[2].charAt(0)+ "" + strArr[3].charAt(0));
}
}

Is This Answer Correct ?    2 Yes 1 No

"Sun Certified Java Programmer" This is one String , we need to print SCJP, write the jav..

Answer / dhinesh manthiram

class Krish {
public static void main(String args[]) {
String str = "Sun Certified Java Programmer";
String str2="";
for(int i=0;i<str.length();i++)
{
char c = str.charAt(i);
if(Character.isUpperCase(c))
{

str2 = str2+c;
}
}

System.out.println("Result="+str2);
}}

Is This Answer Correct ?    1 Yes 0 No

"Sun Certified Java Programmer" This is one String , we need to print SCJP, write the jav..

Answer / java_allinterview_faq

by : Viswathan

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Java J2EE AllOther Interview Questions

what is difference between business deligate and session facade ?

2 Answers   Fidelity,


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

0 Answers   CTS,


Which of the following declaration is wrong? int i=45; float j = 45.0; double k=45.0;

5 Answers   Adobe,


what is java virtual machine

4 Answers  


wnet use DAO design in u r project?

1 Answers   Godrej,






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

0 Answers  


HOW MUCH PERCENTAGE WE DEDUCT FOR OUR SUPPLIERS OR OTHER PROFESSIONALS

0 Answers  


What causes Out of Memory exception?

5 Answers   CTS,


I have include a jsp page by using <jsp:include page="/.../xyz.jsp"/> The thing is that the xyz.jsp page has its submit button.When i click on that button the whole main page get refreshed.But i want to refresh only the xyz.jsp page.How could i achive it so that i can only refresh the xyz.jsp not the main page page?

4 Answers  


whats the relation ship between LDAP and JNDI?

1 Answers  


what is jndi?

2 Answers  


Difference b/w >> and >>> ?

1 Answers   Adobe, Infosys,


Categories