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 |
What gives java it’s “write once and run anywhere” nature?
What is class path in java?
What is meant by code profiling?
What is jboss in java?
What are the differences between java’s old java date api and java 8’s date and time api?
Who is at risk in java? : java security
What is predicate in lambda expression?
what is transient variable?
What is a jpa repository?
please suggest me final year project ideas for computer engg.on java as soon as possible becaus eo want to sumbit project name. and i am very confused.
What are anonymous methods and lambda expression?
How common are security breaches? : java security