Java Interview Coding Questions:
1) How To Reverse a String without using reverse method: public class Reverse { public static void main ( String [] args ) { String str = "STRING" ; char [] chr = str . toCharArray (); for ( int i = chr . length - 1 ; i >= 0 ; i --) { System . out . print ( chr [ i ]); } } } 2) Swap two numbers without using third variable: public class Swap { public static void main ( String [] args ) { int a = 11 ; int b = 12 ; //logic b = b - a ; a = a + b ; b = a - b ; System . out . println ( "value of a is " + a ); ...