Aspire Systems Interview Question

str="AB0CD1010" this s a string consider it as a counter variable n increment it for example the next element should be "AB0CD1011"......

Interview Answer

Anonymous

Jul 15, 2014

String str="AB0CD1010"; int a=Integer.parseInt(str,16); a++; str=toHexString(a); System.out.println(""+str);

7