brij tiwari

Greenhorn
+ Follow
since Dec 27, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by brij tiwari

For the first call with foo(0), the finally block prints the output value then returns the output value which is then printed by the system.out call in main method.so value 'b' is printed two times.

For second call with foo(1),the catch block make output as 'ba' and returns 'ba' to main method, but before returning finally block is called always...so before printing the returned value i.e. 'ba' first finally block prints the 'bab' value...after that since the return value is 'ba' only thats y main prints 'ba'

so the sequence is
b
b
bab
ba
u can use the method in Integer wrapper class as follows:::

String hexVal = "A"; //Hexadecimal

int decvalue= Integer.parseInt(hexVal,16);