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?
Answer Posted / 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 |
Post New Answer View All Answers
What is a java executable jar file?
What's the difference between authentication and authorization? : java security
Can java program run without jdk?
What does persist mean in java?
How do you count in java?
How do you check if java is installed on windows command prompt?
Why is javac not recognized?
Who created eclipse?
How many types of jdk are there?
What is singleton pattern in java?
What is explicit casting?
Do I need jdk or jre?
Are streams faster than for loops?
What is the difference between a jdk and a jvm?
Is lambda cheaper than ec2?