The compiler automatically provides the missing parameters with the specified default values. Use of default parameters in programs reduces the amount of code to write and makes the source easier to read and understand. The file complex.java demonstrates the use of operator overloading as well as default parameters. Class templates JUMP also allows to define and use class templates. Templates are very useful to create generic types, e.g. typesafe containers.
Templates are a very powerful feature that allow developpers to write code independent of types.
Generic types are an essential feature for typesafe languages in large projects to reduce the amount of code to write and to make programs better maintainable. Use of template classes is not only more safe than using non-type specific classes, it also produces faster programs since type casts can often be avoided. The file doesn't contain any bytecode. When the compiler sees a template instantion the compiler uses this file to generate the code for a instantiated template class with the specified types. Declaration and instantiation of a variable The file JumpSet.java demonstrates how a template class can be defined.