Today i stacked in a problem then i knew this and so i want to share with you!
It is a very simple problem but i think most of the people still doesn't know about it because we generally use some predefined functions for it such as
Integer.parseInt() and Integer.ValueOf()
Here is the user-defined function for converting string to integer.
For example:Input- String s="2345"
Output- int a=2345
public satic void main(String args)
public static int Int_val(String s)
I hope you like