Integer myInt = GetterUtil.getInteger(myObj);
Integer myInt = GetterUtil.getInteger(myObj, 42);This example is similar to the first, but provides a default value of 42 in case myObj is null or does not contain a valid integer value. Overall, the com.liferay.portal.kernel.util package is a valuable resource for developers who want to build applications on the Liferay portal platform. Its classes and methods provide a range of useful tools for handling common development tasks, such as object value retrieval and type conversion.