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
How do I enable java in google chrome?
Write a program for the problem: the array of inetegers indicating the marks of the students is given, U have to calculate the percentile of the students aaccording to this rule: the percentile of a student is the %of no of student having marks less then him. For eg: suppose Student Marks A 12 B 60 C 80 D 71 E 30 F 45 percentile of C = 5/5 *100 = 100 (out of 5 students 5 are having marks less then him) percentile of B = 3/5*100 = 60% (out of 5, 3 have markses less then him) percentile of A = 0/5*100 = 0%.
Which class is the superclass of every class?
What are java’s rules regarding tabs, spaces and newline characters?
What happens if javac is not recognized?
What is a static method?
How do I download and install eclipse on windows 10?
What is loose coupling in java?
What is the difference between ec2 and lambda?
What is lambda expression in mvc?
What is difference between map and flatmap in java 8?
What is hql in java?
Explain the reason for each keyword of public static void main(string args[])?
I run a web server. Am I at risk? : java security
Why there are no global variables in java?