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...

can you program for reverse string?

Answer Posted / pratyush kumar nayak

String Original,Reverse="";
System.out.println("Enter String To Reverse");
Scanner sc=new Scanner(System.in);
Original=sc.nextLine();
int length=Original.length();
for(int i=length-1;i>=0;i--){
Reverse=Reverse+Original.charAt(i);
}
System.out.println("The Reversed String is " + Reverse);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If you are given the name of the function at run time how will you invoke the function?

1077


How is hashcode calculated in java?

980


What is lazy initialization in java?

938


Difference between Preemptive scheduling vs. Time slicing?

977


What does 0 mean in boolean?

929


What is set in java?

986


Explain the purpose of garbage collection in Java?

971


How to find the given number is a prime number or not by getting input from the user

1027


Is java se open source?

970


Are arrays static in java?

1005


What does a boolean method return?

1146


Can a method be overloaded based on different return type but same argument type?

907


What is byte [] in java?

956


State the main difference between c++ and java?

1034


What is string in java? String is a data type?

955