How to get value of an object and store it in variable int? In string I do this:
String k = s_extend.getValue().toString(); How about in int?
You can use Integer.valueOf() or Integer.parseInt(); unless there's more to your question that would be something like this -
public static void main(String[] args) { String str = "1"; int a = Integer.valueOf(str); // java.lang.Integer return(ed) int b = Integer.parseInt(str); // primitive (int) return(ed) System.out.printf("a = %d, b = %d\n", a, b); } On my machine, running this gives
a = 1, b = 1
Integer.parseInt()?