Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



suppose we have one String s="india is my country"; now we get the o/p "like country..

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

suppose we have one String s="india is my country"; now we get the o/p "like country..

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

Post New Answer

More Java Related AllOther Interview Questions

What gives java it’s “write once and run anywhere” nature?

1 Answers  


What is class path in java?

0 Answers  


What is meant by code profiling?

0 Answers  


What is jboss in java?

0 Answers  


What are the differences between java’s old java date api and java 8’s date and time api?

0 Answers  


Who is at risk in java? : java security

0 Answers  


What is predicate in lambda expression?

0 Answers  


what is transient variable?

5 Answers  


What is a jpa repository?

0 Answers  


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.

1 Answers  


What are anonymous methods and lambda expression?

0 Answers  


How common are security breaches? : java security

0 Answers  


Categories