suppose we have one String s="india is my country"; now we
get the o/p "like country my is India". what is the logic?
Answers were Sorted based on User's Feedback
Answer / neeraj03
String[] x1=s.split(" ");
for( int x2=x1.length-1; x2 >= 0; x2-- )
{
System.out.print( x1[x2] );
System.out.print( " ");
}
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / naresh
String s="india is my country";
String[] news=s.split(" ");
StringBuffer sb="";
for(int i=0;i<s.length;i++){
sb.append(s[i]);
sb.append(" ");
}
| Is This Answer Correct ? | 1 Yes | 0 No |
can anyone tell me what kind of questions are asked for core java exam in aptech
What are orm tools in java?
Is jar an executable?
What is the difference between map and flatmap in java?
What is contextpath in java?
What is native class in java?
Explain suspend() method under thread class>
What are the authentication modes in asp.net? : java security
what diff bw constructor method & method
Why doesn't lsdou work under windows nt? : java security
What is flatmap in java8?
What is an interceptor in java?