print reverse string without api

print reverse string without api

accept a string and print reverse without using api

View Answers

February 4, 2013 at 6:02 PM

hi friend try the code given below this may helpful for you

public class ReverseString
{
     public static void main(String args[])
       {
            String str = "hello";
            int len = str.length();
            char tempArr[]=new char[len ];
            char revArr[]=new char[len ];
            tempArr = str.toCharArray();
            int k = 0;
            for(int i=len-1; i >=0; i--)
              {
                revArr[k] = tempArr[i];
                k++;
              }

           System.out.println("Original String = "+str);
           System.out.print("Reverse String = ");
           for(int j = 0; j < len; j++)
              {
                System.out.print(revArr[j]);
              }
       }
}









Related Tutorials/Questions & Answers:
print reverse string without api
print reverse string without api  accept a string and print reverse without using api
how to reverse a string without changing its place
how to reverse a string without changing its place  how to reverse a string without changing its place   Hi Friend, Another way of reversing string: import java.util.*; public class ReverseString{ public static
Advertisements
Java reverse string without using inbuilt functions
Java reverse string without using inbuilt functions In this tutorial, you will learn how to reverse string without using any inbuilt functions. Here, we have created a method to reverse the string and returns a new string with reverse
reverse string
reverse string  how to reverse a string without changing its place...=input.nextLine(); String reverse = new StringBuffer(str).reverse().toString...{ public static void main(String[]args){ Scanner input=new Scanner
String reverse in java
in java but in most interview they will ask to reverse a string without...String reverse in java In this section we are going to discuss about how to reverse a sting in java. There are many ways to reverse a string in java 
String Reverse Using StringUtils
String Reverse Using StringUtils       In this example we are going to reverse a given string using StringUtils api. In this example we are reversing a string and the reversed
string reverse order
string reverse order  Hi I have string s= " kalins naik" then how can i print string s=" naik kalins" Thanks kalins naik   import java.util.*; public class ReverseWords{ public static void main(String[] args
Read a string and reverse it and then print in alphabetical order.
Read a string and reverse it and then print in alphabetical order... given below takes string value from user and reverse that string by using String reverse(String str) method and set in alphabetical order by String
Reverse string in BlueJ
Reverse string in BlueJ  wap that user enter a string and one word. so i want that program search word in string entered by user if word exist in string than reverse only that word and give output. e.g This is a flower (string
String reverse program
String reverse program  write a java program for reverse string? if the string is "Hi welcome to hyderabad" the reverse string is "hyderabad... for help. You can split the String into String array using split method of String
print without newline in python
print without newline in python  Hi, I have a Python program... the print it in one line. My example: print("I ") print("Love ") print("Python") But the output is coming in new lines. I want to know how to print without
print without newline in python
print without newline in python  Hi, I have a Python program... to print without newline in python? Thanks   Hi,ADS_TO_REPLACE_2... the print it in one line. My example:ADS_TO_REPLACE_1 print("I ") print("Love
A Program To Reverse Words In String in Java
A Program To Reverse Words In String in Java  A Program To Reverse Words In String in Java for example: Input:- Computer Software Output :- Software Computer without using split() , StringTokenizer function or any extra
A Program To Reverse Words In String in Java .
A Program To Reverse Words In String in Java .  A Program To Reverse Words In String in Java :- For Example :- Input:- Computer Software Output :- Software Computer
A Program To Reverse Words In String in Java .
A Program To Reverse Words In String in Java .  A Program To Reverse Words In String in Java :- For Example :- Input:- Computer Software Output :- Software Computer
A Program To Reverse Words In String in Java .
A Program To Reverse Words In String in Java .  A Program To Reverse Words In String in Java :- For Example :- Input:- Computer Software Output :- Software Computer
A Program To Reverse Words In String in Java .
A Program To Reverse Words In String in Java .  A Program To Reverse Words In String in Java :- For Example :- Input:- Computer Software Output :- Software Computer
A Program To Reverse Words In String in Java .
A Program To Reverse Words In String in Java .  A Program To Reverse Words In String in Java :- For Example :- Input:- Computer Software Output :- Software Computer
Reverse word of string in alphabetical order
Reverse word of string in alphabetical order  wap a program that reverse word of string in alphabetical order. e.g. input by user The purpose of education is to replace an empty mind with an open one output
String Reverse in Java
String Reverse in Java       In this example we are going to reverse a given string... the input string by using the StringBuffer(String string) method, reverse
Java Reverse String Pattern
Java Reverse String Pattern In this section, we have displayed a string in reverse pattern. For this,we have specified a string which is first converted into character array and then print it. Then we have reversed the string using
Getting the string in reverse
Getting the string in reverse  i am giving the string=" i am sachin".for this output is "sachin am i".please give me the code?   Hi Friend, Visit Here Thanks
Getting the string in reverse
Getting the string in reverse  i am giving the string=" i am sachin... static void main(String[] args) { Scanner input=new Scanner(System.in); System.out.print("Enter String: "); String st=input.nextLine
Reverse String Program in Java
reverse string without using inbuilt functions Java : String Compare...Reverse String Program in Java We are going to describe about reverse...(String args[]) { String string, reverse = ""; Scanner
JavaScript reverse text string
JavaScript reverse text string...; In this section, we are going to reverse the text string using JavaScript... entering the text, you will get the reverse string in the same text box. Here
String Reverse In Java Example
String Reverse In Java Example In this tutorial we will read about reversing... reverse value. Reversing a String is an operation to represent an original String... to display the String in reverse order. Syntax of StringBuilder reverse() method.ADS
how to print String as pattern ?
how to print String as pattern ?  i have a one String name ="rajesh" i want to print pattern like r * ra ** raj raje rajes rajesh please help me
How to print a webpage without url and date in jsp ?
How to print a webpage without url and date in jsp ?  How to print a webpage without url and date in jsp
Reverse String using Stack
Reverse String using Stack You all are aware of Stack, a data structure... in the reverse order from that in which they are added. The push operation is responsible for adding the element and pop for removing. Here we are going to reverse
Java reverse words in a string using only loops
Java reverse words in a string using only loops In this tutorial, you will learn how to reverse words in a string without using any inbuilt methods like...;=c.length;i++) { if(i==c.length) { reverse(c,word_start_index,i-1); } else
C String Reverse
C String Reverse       In this section, you will study how to reverse a string. You can see in the given example, a recursive function reverse(int i) is created. Inside
how to print dot in python without newline
how to print dot in python without newline  Hi, I a debugging... to print 20 dots without new line. Is there any easy solution? how to print dot... without new line. Here is output of the program. >>> print("."*10
how to print dot in python without newline
how to print dot in python without newline  Hi, I a debugging... places i want to print 20 dots without new line. Is there any easy solution? how to print dot in python without newline?ADS_TO_REPLACE_2 Can I use variable
Java Reverse words of the String
Reverse words of the String Java Programming In this section, we are going to reverse the words of the string. For this, we have allowed the user to enter the string. Then we have converted the string into tokens using StringTokenizer
reverse
reverse  program to read a string and print the reverse string  ...*; public class ReverseString{ public static void main(String[]args){ Scanner input=new Scanner(System.in); System.out.print("Enter String
reverse words in a string(words seperated byone or more spaces)
reverse words in a string(words seperated byone or more spaces)  reverse words in a string(words separated by one or more spaces
Out of bounce exception in the string reverse program - Java Beginners
Out of bounce exception in the string reverse program  In the given... void main(String[] args) { String string=args[0]; String reverse = new StringBuffer(string). reverse().toString(); System.out.println
Breaking a string into words without using StringTokenizer
Breaking a string into words without using StringTokenizer  how can we Break a string into words without using StringTokenizer ??   The given code convert the string into words. import java.util.*; class StringExample
String length without using length() method in java
String length without using length() method in java  How to count length of string without using length() method in java?   Here is Example... the number of character into the given string without using the length() method
how to convert string to char array in java without using tochararray
how to convert string to char array in java without using tochararray  Hi, I want to convert the String object in java without the toChararray() function. how to convert string to char array in java without using
Write a java program that prints the decimal representation in reverse. (For example n=173,the program should print 371.)c
Write a java program that prints the decimal representation in reverse. (For example n=173,the program should print 371.)c  class rose { int n... static void main(String args[]) { System.out.println("Enter the number"+n
string
string  write a program to accept the string and store the reverse stream into another array and print
Reverse
Reverse  How to reverse two digits in javaprogramming
Reverse
Reverse  How to reverse two digits in javaprogramming
Java repeat string without using loops
Java repeat string without using loops In this section, you will learn how to repeat string without using for loops. The given example accepts the number of times and iterates the string to the number of times set by the user without
print selected checkbox names in array without form tag
print selected checkbox names in array without form tag  Hi everyone ... I have problem in my program. I have hashmap i.e. collection , my... seleced checked checkbox names, when i click on button but without using FORM tag
How to Manipulate List to String and print in seperate row
How to Manipulate List to String and print in seperate row  I am... is a List. String appname = "abc"; String path = "//home/exportfile//"; String filename = path+"ApplicationExport-"+appname+".txt
how to write a function to print for finding the longest palindrome in the given string
how to write a function to print for finding the longest palindrome in the given string  how to write a function to print for finding the longest palindrome in the given string
reverse the charstring
reverse the charstring  how to reverse any character of the string
How to declare a Combobox without using a string in its declaration?
How to declare a Combobox without using a string in its declaration?  ... the values later? For example JComboBox x= new JComboBox(); ... String s={"Alpha... java.awt.event.*; public class DynamicCombobox { public static void main(final String args

Ads