String reverse = new StringBuffer(string).
Semi colon missing in the above line
you cant make the reference of a string to string buffer
error message there.
correct code:
StringBuffer reverse = new StringBuffer(string);
reverse().toString();
reverse is not a function or constructor its a variable
correct code:
reverse.toString();
ye programs run to hote hi nae h....................
age se sath me run kaise kare ye tarika b bta dena..............
nahi to ye kisi kam ke nahi h .......sayad kuch alg method ho inka.......................................................
java.lang.ArrayIndexOutOfBoundsException: 0kamal April 18, 2011 at 8:09 AM
it came out error Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at StringReverseExample.main(StringReverseExample.java:15)
String patternAnkit Srivastava April 18, 2011 at 2:17 PM
when i give the input like My name is Ankit then output will be Ankit is name my please help me how can i get this...
RusDell April 23, 2011 at 4:14 PM
Thank you!
array index out of boundsS1 June 13, 2011 at 7:59 PM
it threw array index out of bounds exception.
object oriented programmingglene June 27, 2011 at 11:56 AM
How to reverse a string then compare to the original string
questionsyira October 10, 2011 at 10:50 AM
let say if i wanted just the word how to be reverse.how can i do it??can you show some examples??thanks
Thank you Jackson October 16, 2011 at 12:13 AM
Thanks i was looking for this link.
hi,Dni November 1, 2011 at 2:47 AM
i am getting Exception ArrayBoundException..plz give me the reverseString prog by giving input through the keyboard...
Error in the above codeShivangi Nigam November 21, 2011 at 11:34 AM
String reverse = new StringBuffer(string). Semi colon missing in the above line you cant make the reference of a string to string buffer error message there. correct code: StringBuffer reverse = new StringBuffer(string); reverse().toString(); reverse is not a function or constructor its a variable correct code: reverse.toString();
StringUmair January 31, 2012 at 3:12 PM
import java.util.Scanner; public class sortString { public static void main(String args[]){ Scanner input=new Scanner(System.in); String s; String reverse=""; System.out.println("Enter String:"); s=input.next(); for(int i=0;i<s.length();i++){ reverse=s.charAt(i)+reverse; } System.out.println("Reverse String= "+reverse); } }
....prashnat March 5, 2012 at 1:12 AM
please tell me the basic logic not using inbuilt method
JVM architure in javashiva April 18, 2012 at 6:23 PM
GOOD PROCESS
javaramesh April 23, 2012 at 3:34 PM
import java.io.*; class str { public static void main(String a[])throws IOException { DataInputStream dt=new DataInputStream(System.in); String s; System.out.println("enter the string"); s=dt.readLine(); System.out.println("value="+s); String s1=new StringBuffer(s).reverse().toString(); System.out.println("value="+s1); } }
programkanagavelrajb April 28, 2012 at 6:01 PM
frequently asks interview program questions with solution using C and Java
reverse a stringshan June 2, 2012 at 2:03 PM
thank
computer 21L1Chandria July 20, 2012 at 10:58 AM
the execution of the crting is not correct..
about programkannu August 7, 2012 at 12:51 PM
ye programs run to hote hi nae h.................... age se sath me run kaise kare ye tarika b bta dena.............. nahi to ye kisi kam ke nahi h .......sayad kuch alg method ho inka.......................................................
stringapurva August 14, 2012 at 11:13 AM
no comment
Comentsabhishek September 28, 2012 at 3:07 PM
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at StringReverseExample.main(StringReverseExample.java:5)
javaahmed October 4, 2012 at 2:31 PM
this program isnt useful at all its all bullshit and i think you guys should change the way you guys explain it
Post your Comment