"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

Explain JSP life cycle?

2 Answers   Accenture,


can u draw class/object diagram for ATM

0 Answers   HCL, Zycus Infotech,


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

0 Answers  


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

0 Answers  


what is the diffrence between insurance and telecom domain?

1 Answers  






What is java collection? : java collections

0 Answers  


HOW MUCH PERCENTAGE WE DEDUCT FOR OUR SUPPLIERS OR OTHER PROFESSIONALS

0 Answers  


What is the use of log4j and how to make use of that in a application?

2 Answers  


Q1. A. Write note on "The class path Environment Variable". B. Which are different kinds of source code? Q2. A. How to create an interface? B. Why convert an applet to an application? Q3. A. How to use Media tracker Class. B. How to use string tokenizer class. Q4. A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on "The properties class" Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.

1 Answers  


What is an algorithm in java collection framework? : java collections

0 Answers  


Difference between Spring framework and Struts framework?

12 Answers   IBM, L&T, VAM,


Which is the better framework for web applications, struts or spring, and why?

1 Answers   IBM, TATA,


Categories