The casting type is used to assign an object of one type to another without changing or analyzing the contents of the object. Although the parseInt method parses the String values ββand converts it to an integer value, that is, it converts the String value to integer.
Type listing has nothing to do with the contents of an object. It is used only to assign a reference type of one type to another. For example: Object obj = new String(""); String string = (String) obj; Object obj = new String(""); String string = (String) obj;
source share