unboxing
-
Boxing, unboxing, and autoboxingStaticPL/JAVA 2019. 9. 27. 11:20
1. Overview Let's clarify what boxing, unboxing, and autoboxing are and Why it needs and how to work. 2. Description 2.1 Definition Name Definition Invoking cases Autoboxing Converting a primitive value into an object of the corresponding wrapper class Passed as a parameter to a method that expects an object of the corresponding wrapper class Assigned to a variable of the corresponding wrapper c..
-
Generics and Generic MethodsStaticPL/JAVA 2019. 8. 27. 11:45
1. Overview Generic was designed to extend Java's type system to allow "a type or method to operate on objects of various types while providing compile-time type safety". The aspect of compile-time type safety was not fully achieved since it was shown in 2016 that it is not guaranteed in all classes. 2. Motivation Ensure type safety Ensure that generics wouldn't cause an overhead at runtime whic..