You may ask how Java handle the Generics objects???
1. Source compiles into a class file.
- The generic class (eg. AnyClass <T>) is stored in name AnyClass.class and the <T>information is stored with it.
2. The 'new' command creates a normal object.
- The object constructed has one of the type information
3. Code is generated to access the object.
- Type checking is made at compile time to make sure the correct object type are used.
Groovy Goodness: What Character Are You?
-
Groovy adds a couple of methods to the Character class to determine of the
character is a letter, digit, whitespace, upper- or lowercase.
55 minutes ago


0 comments:
Post a Comment