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 ? | 0 Yes | 0 No |
Input :14000 Output : hundred and fourteen thousand.(wrong) Desired output : fourteen hundred thousand.
What is class forname java?
Can the main method be overloaded?
In system.out.println(), what is system, out and println?
What is Map,List,hashtable,ArrayList and difference between them??
What is gui in java with examples?
What is the use of entity class in java?
What is javabeans api?
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.
Why is lambda expression used?
How can I check single byte, double byte of character in JTextField?(eg. japan unicode and English unicode)
What is an entity in java?