??
?? ?? "??? ?? ???? HashMap ??"??? ??? ??? ???? ???? HashMap? ???? ??? ??????.
??? ??? ???? ?-? ?? ??? ?? ????.
???? ???? ?? ??
??
? ?? ?? ??? ?????. ? ?? ??(?: MapItem)?? ?-? ?? ???? ? ?? ??(?: MapItems)?? MapItem ?? ??? ?????.
?? ?? @MapItem
@MapItem ??? ?? ?-? ?? ?????.
@Target(ElementType.FIELD) public @interface MapItem { String key(); String value(); }
?? ?? @MapItems
@MapItems ??? MapItem ??? ?????.
@Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface MapItems { MapItem[] items(); }
?? ???
@MapItem ?? ??? @MapItems ??? ?????.
class ExampleDto { @MapItems(items = { @MapItem(key = "1", value = "MALE"), @MapItem(key = "2", value = "FEMALE"), @MapItem(key = "6", value = "DIVERS") }) public String salutation; }
MapItemsTest? MapItems ??? ??????. ???? ??? ???? ?????.
@MapItem ??? ???? ??? ???? ?? @MapItem?? HashMap? ???? ?? ???? HashMap? ?????.
class MapItemsTest { @Test void testMapItems() throws NoSuchFieldException { Field field = ExampleDto.class.getDeclaredField("salutation"); field.setAccessible(true); MapItems annotation = field.getAnnotation(MapItems.class); Map<String, String> mappingItems = Arrays .stream(annotation.items()) .collect( Collectors.toMap( MapItem::key, MapItem::value ) ); assertEquals( new HashMap<>() {{ put("1", "MALE"); put("2", "FEMALE"); put("6", "DIVERS"); }}, mappingItems ); } }
??
??
??? ??? ????? ???? ????.
??
?? ?? ?-? ?? ??? ????? ????? ????? ???? ???.
?? ??
http://www.miracleart.cn/link/164710e8521a5b39302f816392f05bc2
?? ??
- ?? ??? HashMap ??
- ??? ?? ?? ??? ?? Jackson JsonSerializer ? JsonDeserializer ???
? ??? ??? ?? ???? ?-? ?? ??? ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











?? ?? ?? ??? ??? ?? ??? ??, ? ? ?? ? ??? ?????. 1. ??? ?? ???? ?? ???? ???-????, ? ??? ??? ??? ? ????, Hashmap? ???-??? ?? ??? ??? ???? ????. 2. NULL ? ?? ???? HashMap? ??? NULL ?? ?? ? ?? ???? ?? HashTable? NULL ?? ?? ???? ??? NullPointerException? ?????. 3. ????? ??? ????? ?? ??? ?? ?? ? ????? HashTable? ? ??? ?? ?? ??? ????. ?? ConcurrenTashMap? ???? ?? ????.

Java? ?? ??? ??? ?? ??? ??? ?? ??? ??? ?? ??? ?? ?? ??? ???? ??? ?? ???? ?????. 1. ??? ???? ??? ?? ?? ? ???? ?? ??? ???? ?? ?? ??? ? ????. 2. ???? ?? ??? ???? ??? ?? ???? ?? ?? ??? ???????. 3. ?? ???? ?? ?? ?? ? ???? ???? ?? NULL ?? ??? ? ????. 4. ?? ???? ??? ?? ?? ? ??? ?????? ?? ??? ??? ?? ?? ??? ????? ??? ??? ??? ??????? ?? ???? ??????.

staticmethodsininterfaceswereIntRectionSelffacesswithinteffaceswithinteffaceswithintintinjava8toallowutilityFunctionswithinterfaceitswithinteffaceswithinterfaceffaces

JIT ????? ??? ???, ??? ?? ? ???, ?? ?? ? ???? ? ? ?? ?? ??? ? ?? ??? ?? ??? ??????. 1. ??? ???? ?? ?? ??? ??? ?? ?? ???? ??? ?? ?????. 2. ??? ?? ? ??? ?? ?? ? ??? ???? ?? ?? ???; 3. ?? ??? ??? ?? ??? ???? ???? ???? ? ?? ?? ??? ?????. 4. ?? ??? ?? ??? ??? ???? ???? ?? ? ??? ???? ?? ??? ?????.

???? ??? ??? Java?? ??? ?? ???? ??? ?? ? ? ??? ??? ???? ? ?????. ?? ???? ??? ??, ??? ?? ??? ?? ?? ??? ??? ????? ???? ????? ?????. ?? ??? ??? ??, ????? ? ??? ????, ?? ??? ??? ?????? ? ?? ? ?? ?????.

injava, thefinalkeywordpreventsavariable'svalue'svalueffrombeingchangedafterassignment, butitsbehaviordiffersforprimitivesandobjectreences.forprimitivevariables, asinfinalintmax_speed = 100; wherereassoncesanerror.forobjectref

??? ??? ?? ?? ??? ????? ? ???? ????? ???? ?? ???? ?? ???? ?????. ?? ??? ??? ????. ?? ?? ?? ??? ???? ???? ?? ?? ??? ??? ?? ?? ??? ??? ?????. ?? ??? ??? ????. ?? ??? ?? ??? ?? ?? ??? ?? ?? ??? ???? NewClass ()? ??? ?? ???? ????. ?? ??? ?? ??? ???? ?? ??? ?? ? ? ??? ?? ?? ??? ????? ????? ?????. ?? ??, ?? ?????? ?????, ??? ? ?? ????? ??? ?? ?????. ???? ?? ?? ??? ???? ?? ???? ?? ? ??? ???? ?? ??? ?? ?????? ?????. ???? ???? ??? ??, ?? ?? ? ?? ??? ????, ?? ?? ???? ?????.

??? ? ?? ??? ???? : ????? ?? ?. 1. int? ???? ???? ?? ?? ?? ? ??? ???? ?????. 2. ?? ? ???? (int) myDouble ??? ?? ?? ??? ?????. ?? ??? ??? ?? ??? ?? ??, ?? ?? ?? ???? ?? ??? ?? ???? ?? ?????. ???? ? ??? ??? ????. ?? ??? ??? ??? ??? ??? ?? ??? ??? ? ??? ?? ???? ??? ??? ??? ??? ? ??? ?? ??? ?? ??? ?? ?? ? ? ????. ?? ?? ??? ?? ??? ??? ??? ??? ? ??????.
