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

can anyone tell me what kind of questions are asked for core java exam in aptech

0 Answers  


What are orm tools in java?

0 Answers  


Is jar an executable?

0 Answers  


What is the difference between map and flatmap in java?

0 Answers  


What is contextpath in java?

0 Answers  


What is native class in java?

0 Answers  


Explain suspend() method under thread class>

0 Answers  


What are the authentication modes in asp.net? : java security

0 Answers  


what diff bw constructor method & method

4 Answers   CTS,


Why doesn't lsdou work under windows nt? : java security

0 Answers  


What is flatmap in java8?

0 Answers  


What is an interceptor in java?

0 Answers  


Categories