Java Program to Reverse the Given String

Get a String and reverse the characters of the string

Sample Input 1:

Hello

Sample Output 1:

olleH

Program or Solution

				
			
					
//To Reverse The Given String...

import java.util.*;

class Program
{
  public static void main(String args[])
  {
    String str,str1=" ";
    int i;

   Scanner sc=new Scanner(System.in);

   System.out.println("Enter The String:");
   str=sc.next();

   int len=str.length();
   for(i=len-1;i>=0;i--)
    {
        str1=str1+str.charAt(i);
    }

   System.out.println("The Output Is:"+str1);
  }

}
			
				
			

Program Explanation

Comments

ubaTaeCJ
-1 OR 2+461-461-1=0+0+0+1 --
ubaTaeCJ
-1 OR 3+461-461-1=0+0+0+1 --
ubaTaeCJ
-1 OR 3*2<(0+5+461-461) --
ubaTaeCJ
-1 OR 3*2>(0+5+461-461) --
ubaTaeCJ
-1 OR 2+404-404-1=0+0+0+1
ubaTaeCJ
-1 OR 3+404-404-1=0+0+0+1
ubaTaeCJ
-1 OR 3*2<(0+5+404-404)
ubaTaeCJ
-1 OR 3*2>(0+5+404-404)
ubaTaeCJ
-1' OR 2+192-192-1=0+0+0+1 --
ubaTaeCJ
-1' OR 3+192-192-1=0+0+0+1 --
ubaTaeCJ
-1' OR 3*2<(0+5+192-192) --
ubaTaeCJ
-1' OR 3*2>(0+5+192-192) --
ubaTaeCJ
-1' OR 2+60-60-1=0+0+0+1 or 'oWrVGAXD'='
ubaTaeCJ
-1' OR 3+60-60-1=0+0+0+1 or 'oWrVGAXD'='
ubaTaeCJ
-1' OR 3*2<(0+5+60-60) or 'oWrVGAXD'='
ubaTaeCJ
-1' OR 3*2>(0+5+60-60) or 'oWrVGAXD'='
ubaTaeCJ
-1" OR 2+97-97-1=0+0+0+1 --
ubaTaeCJ
-1" OR 3+97-97-1=0+0+0+1 --
ubaTaeCJ
-1" OR 3*2<(0+5+97-97) --
ubaTaeCJ
-1" OR 3*2>(0+5+97-97) --
ubaTaeCJ
if(now()=sysdate(),sleep(15),0)
ubaTaeCJ
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
ubaTaeCJ
0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
ubaTaeCJ
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
ubaTaeCJ
-1; waitfor delay '0:0:15' --
ubaTaeCJ
-1); waitfor delay '0:0:15' --
ubaTaeCJ
1 waitfor delay '0:0:15' --
ubaTaeCJ
PSZFVOGF'; waitfor delay '0:0:15' --
ubaTaeCJ
-5 OR 193=(SELECT 193 FROM PG_SLEEP(15))--
ubaTaeCJ
-5) OR 34=(SELECT 34 FROM PG_SLEEP(15))--
ubaTaeCJ
-1)) OR 572=(SELECT 572 FROM PG_SLEEP(15))--
ubaTaeCJ
q8WOBrp6' OR 716=(SELECT 716 FROM PG_SLEEP(15))--
ubaTaeCJ
0SuBXJIH') OR 401=(SELECT 401 FROM PG_SLEEP(15))--
ubaTaeCJ
vBbt3fa7')) OR 746=(SELECT 746 FROM PG_SLEEP(15))--
ubaTaeCJ
*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
ubaTaeCJ
'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
ubaTaeCJ
1'"
ubaTaeCJ
@@G3XV0