[{"data":1,"prerenderedAt":1148},["ShallowReactive",2],{"blog-\u002Fblog\u002Fjava-data-types-variables":3},{"id":4,"title":5,"body":6,"description":1134,"difficulty":1135,"extension":1136,"framework":1137,"frameworkSlug":242,"meta":1138,"navigation":762,"order":250,"path":1139,"qaPath":1140,"seo":1141,"stem":1142,"subtopic":1143,"topic":1144,"topicSlug":1145,"updated":1146,"__hash__":1147},"blog\u002Fblog\u002Fjava-data-types-variables.md","Java Data Types & Variables — Primitives, Wrappers & the String Pool",{"type":7,"value":8,"toc":1123},"minimark",[9,14,36,40,176,204,208,237,318,335,339,360,458,474,478,492,552,562,649,675,679,690,805,812,816,826,898,941,964,968,989,1069,1079,1083,1119],[10,11,13],"h2",{"id":12},"java-data-types-and-variables","Java data types and variables",[15,16,17,18,22,23,26,27,31,32,35],"p",{},"Java is statically typed, and its type system draws a hard line between ",[19,20,21],"strong",{},"primitives","\n(raw values) and ",[19,24,25],{},"objects"," (references on the heap). That distinction drives how ",[28,29,30],"code",{},"==","\nbehaves, why ",[28,33,34],{},"Integer"," caching produces baffling comparison results, why Strings are\nimmutable, and what \"Java is pass-by-value\" really means. This guide walks through it\nall.",[10,37,39],{"id":38},"the-eight-primitives","The eight primitives",[41,42,43,59],"table",{},[44,45,46],"thead",{},[47,48,49,53,56],"tr",{},[50,51,52],"th",{},"Type",[50,54,55],{},"Size",[50,57,58],{},"Notes",[60,61,62,76,89,102,118,133,145,157],"tbody",{},[47,63,64,70,73],{},[65,66,67],"td",{},[28,68,69],{},"byte",[65,71,72],{},"8-bit",[65,74,75],{},"−128…127",[47,77,78,83,86],{},[65,79,80],{},[28,81,82],{},"short",[65,84,85],{},"16-bit",[65,87,88],{},"−32,768…32,767",[47,90,91,96,99],{},[65,92,93],{},[28,94,95],{},"int",[65,97,98],{},"32-bit",[65,100,101],{},"default for integer literals",[47,103,104,109,112],{},[65,105,106],{},[28,107,108],{},"long",[65,110,111],{},"64-bit",[65,113,114,115],{},"suffix ",[28,116,117],{},"L",[47,119,120,125,127],{},[65,121,122],{},[28,123,124],{},"float",[65,126,98],{},[65,128,129,130],{},"IEEE-754, suffix ",[28,131,132],{},"f",[47,134,135,140,142],{},[65,136,137],{},[28,138,139],{},"double",[65,141,111],{},[65,143,144],{},"default for decimal literals",[47,146,147,152,154],{},[65,148,149],{},[28,150,151],{},"char",[65,153,85],{},[65,155,156],{},"a single UTF-16 code unit",[47,158,159,164,167],{},[65,160,161],{},[28,162,163],{},"boolean",[65,165,166],{},"JVM-defined",[65,168,169,172,173],{},[28,170,171],{},"true"," \u002F ",[28,174,175],{},"false",[15,177,178,179,182,183,186,187,190,191,194,195,194,197,199,200,203],{},"Primitives hold their value directly and can never be ",[28,180,181],{},"null",". Everything else —\n",[28,184,185],{},"String",", arrays, your classes — is a ",[19,188,189],{},"reference type"," accessed through a pointer.\nFields default to a zero value (",[28,192,193],{},"0",", ",[28,196,175],{},[28,198,181],{},"); ",[19,201,202],{},"local variables get no default","\nand must be assigned before use.",[10,205,207],{"id":206},"primitives-vs-wrappers-and-autoboxing","Primitives vs wrappers, and autoboxing",[15,209,210,211,214,215,217,218,194,220,217,222,225,226,228,229,232,233,236],{},"Every primitive has an object ",[19,212,213],{},"wrapper"," (",[28,216,95],{},"->",[28,219,34],{},[28,221,139],{},[28,223,224],{},"Double",", …). The\nprimitive is a raw value; the wrapper is a heap object that can be ",[28,227,181],{}," and is required\nwherever Java needs an object — generics (",[28,230,231],{},"List\u003CInteger>",", never ",[28,234,235],{},"List\u003Cint>","),\ncollections, nullable fields.",[238,239,244],"pre",{"className":240,"code":241,"language":242,"meta":243,"style":243},"language-java shiki shiki-themes github-light github-dark","int a = 5;          \u002F\u002F raw value\nInteger b = 5;      \u002F\u002F object reference, can be null\nInteger c = null;\nint x = c;          \u002F\u002F NullPointerException — unboxing null\n","java","",[28,245,246,272,288,302],{"__ignoreMap":243},[247,248,251,254,258,261,265,268],"span",{"class":249,"line":250},"line",1,[247,252,95],{"class":253},"szBVR",[247,255,257],{"class":256},"sVt8B"," a ",[247,259,260],{"class":253},"=",[247,262,264],{"class":263},"sj4cs"," 5",[247,266,267],{"class":256},";          ",[247,269,271],{"class":270},"sJ8bj","\u002F\u002F raw value\n",[247,273,275,278,280,282,285],{"class":249,"line":274},2,[247,276,277],{"class":256},"Integer b ",[247,279,260],{"class":253},[247,281,264],{"class":263},[247,283,284],{"class":256},";      ",[247,286,287],{"class":270},"\u002F\u002F object reference, can be null\n",[247,289,291,294,296,299],{"class":249,"line":290},3,[247,292,293],{"class":256},"Integer c ",[247,295,260],{"class":253},[247,297,298],{"class":263}," null",[247,300,301],{"class":256},";\n",[247,303,305,307,310,312,315],{"class":249,"line":304},4,[247,306,95],{"class":253},[247,308,309],{"class":256}," x ",[247,311,260],{"class":253},[247,313,314],{"class":256}," c;          ",[247,316,317],{"class":270},"\u002F\u002F NullPointerException — unboxing null\n",[15,319,320,323,324,327,328,330,331,334],{},[19,321,322],{},"Autoboxing"," converts a primitive to its wrapper automatically; ",[19,325,326],{},"unboxing"," does the\nreverse. It's convenient but has costs: unboxing ",[28,329,181],{}," throws, and boxing in a loop\ncreates garbage (",[28,332,333],{},"Integer sum = 0; sum += x;"," boxes every iteration — use a primitive\naccumulator).",[10,336,338],{"id":337},"the-vs-equals-story-and-integer-caching","The == vs .equals() story (and Integer caching)",[15,340,341,343,344,347,348,351,352,355,356,359],{},[28,342,30],{}," compares ",[19,345,346],{},"references"," for objects and raw ",[19,349,350],{},"values"," for primitives; ",[28,353,354],{},".equals()","\ncompares ",[19,357,358],{},"logical equality"," defined by the class. This produces one of Java's most\nfamous gotchas:",[238,361,363],{"className":240,"code":362,"language":242,"meta":243,"style":243},"Integer a = 127, b = 127;\nSystem.out.println(a == b);   \u002F\u002F true  — Java caches Integers from −128 to 127\nInteger c = 128, d = 128;\nSystem.out.println(c == d);   \u002F\u002F false — outside the cache, distinct objects\nSystem.out.println(c.equals(d)); \u002F\u002F true — value comparison\n",[28,364,365,384,404,422,439],{"__ignoreMap":243},[247,366,367,370,372,375,378,380,382],{"class":249,"line":250},[247,368,369],{"class":256},"Integer a ",[247,371,260],{"class":253},[247,373,374],{"class":263}," 127",[247,376,377],{"class":256},", b ",[247,379,260],{"class":253},[247,381,374],{"class":263},[247,383,301],{"class":256},[247,385,386,389,393,396,398,401],{"class":249,"line":274},[247,387,388],{"class":256},"System.out.",[247,390,392],{"class":391},"sScJk","println",[247,394,395],{"class":256},"(a ",[247,397,30],{"class":253},[247,399,400],{"class":256}," b);   ",[247,402,403],{"class":270},"\u002F\u002F true  — Java caches Integers from −128 to 127\n",[247,405,406,408,410,413,416,418,420],{"class":249,"line":290},[247,407,293],{"class":256},[247,409,260],{"class":253},[247,411,412],{"class":263}," 128",[247,414,415],{"class":256},", d ",[247,417,260],{"class":253},[247,419,412],{"class":263},[247,421,301],{"class":256},[247,423,424,426,428,431,433,436],{"class":249,"line":304},[247,425,388],{"class":256},[247,427,392],{"class":391},[247,429,430],{"class":256},"(c ",[247,432,30],{"class":253},[247,434,435],{"class":256}," d);   ",[247,437,438],{"class":270},"\u002F\u002F false — outside the cache, distinct objects\n",[247,440,442,444,446,449,452,455],{"class":249,"line":441},5,[247,443,388],{"class":256},[247,445,392],{"class":391},[247,447,448],{"class":256},"(c.",[247,450,451],{"class":391},"equals",[247,453,454],{"class":256},"(d)); ",[247,456,457],{"class":270},"\u002F\u002F true — value comparison\n",[15,459,460,461,464,465,470,471,473],{},"The ",[28,462,463],{},"IntegerCache"," reuses small, common integers. The lesson: ",[19,466,467,468],{},"always compare wrapper\nvalues with ",[28,469,354],{}," (or unbox), never ",[28,472,30],{},".",[10,475,477],{"id":476},"strings-immutability-and-the-pool","Strings: immutability and the pool",[15,479,480,481,483,484,487,488,491],{},"A ",[28,482,185],{},"'s character data is ",[28,485,486],{},"final"," and never changes; any \"modification\" returns a\n",[19,489,490],{},"new"," String. Immutability enables the string pool, thread safety, cached hash codes,\nand security.",[238,493,495],{"className":240,"code":494,"language":242,"meta":243,"style":243},"String s = \"hello\";\ns.concat(\" world\");      \u002F\u002F new String, discarded\ns = s.concat(\" world\");  \u002F\u002F reassign to the new String\n",[28,496,497,510,530],{"__ignoreMap":243},[247,498,499,502,504,508],{"class":249,"line":250},[247,500,501],{"class":256},"String s ",[247,503,260],{"class":253},[247,505,507],{"class":506},"sZZnC"," \"hello\"",[247,509,301],{"class":256},[247,511,512,515,518,521,524,527],{"class":249,"line":274},[247,513,514],{"class":256},"s.",[247,516,517],{"class":391},"concat",[247,519,520],{"class":256},"(",[247,522,523],{"class":506},"\" world\"",[247,525,526],{"class":256},");      ",[247,528,529],{"class":270},"\u002F\u002F new String, discarded\n",[247,531,532,535,537,540,542,544,546,549],{"class":249,"line":290},[247,533,534],{"class":256},"s ",[247,536,260],{"class":253},[247,538,539],{"class":256}," s.",[247,541,517],{"class":391},[247,543,520],{"class":256},[247,545,523],{"class":506},[247,547,548],{"class":256},");  ",[247,550,551],{"class":270},"\u002F\u002F reassign to the new String\n",[15,553,460,554,557,558,561],{},[19,555,556],{},"string pool"," stores one shared copy of each literal, so identical literals are the\nsame object — but ",[28,559,560],{},"new String(...)"," creates a fresh heap object that isn't pooled.",[238,563,565],{"className":240,"code":564,"language":242,"meta":243,"style":243},"String a = \"hi\", b = \"hi\";\nString c = new String(\"hi\");\na == b          \u002F\u002F true  (same pooled object)\na == c          \u002F\u002F false (new heap object)\na == c.intern() \u002F\u002F true  (intern() returns the pooled copy)\n",[28,566,567,585,606,619,631],{"__ignoreMap":243},[247,568,569,572,574,577,579,581,583],{"class":249,"line":250},[247,570,571],{"class":256},"String a ",[247,573,260],{"class":253},[247,575,576],{"class":506}," \"hi\"",[247,578,377],{"class":256},[247,580,260],{"class":253},[247,582,576],{"class":506},[247,584,301],{"class":256},[247,586,587,590,592,595,598,600,603],{"class":249,"line":274},[247,588,589],{"class":256},"String c ",[247,591,260],{"class":253},[247,593,594],{"class":253}," new",[247,596,597],{"class":391}," String",[247,599,520],{"class":256},[247,601,602],{"class":506},"\"hi\"",[247,604,605],{"class":256},");\n",[247,607,608,611,613,616],{"class":249,"line":290},[247,609,610],{"class":256},"a ",[247,612,30],{"class":253},[247,614,615],{"class":256}," b          ",[247,617,618],{"class":270},"\u002F\u002F true  (same pooled object)\n",[247,620,621,623,625,628],{"class":249,"line":304},[247,622,610],{"class":256},[247,624,30],{"class":253},[247,626,627],{"class":256}," c          ",[247,629,630],{"class":270},"\u002F\u002F false (new heap object)\n",[247,632,633,635,637,640,643,646],{"class":249,"line":441},[247,634,610],{"class":256},[247,636,30],{"class":253},[247,638,639],{"class":256}," c.",[247,641,642],{"class":391},"intern",[247,644,645],{"class":256},"() ",[247,647,648],{"class":270},"\u002F\u002F true  (intern() returns the pooled copy)\n",[15,650,651,652,654,655,657,658,660,661,664,665,670,671,674],{},"This is why comparing strings with ",[28,653,30],{}," seems to work for literals but breaks for\ncomputed strings — always use ",[28,656,354],{},". For heavy string building, ",[28,659,185],{},"\nconcatenation in a loop is ",[28,662,663],{},"O(n²)"," garbage; use a ",[19,666,667],{},[28,668,669],{},"StringBuilder"," (mutable,\nunsynchronized) — or ",[28,672,673],{},"StringBuffer"," when you need thread safety.",[10,676,678],{"id":677},"pass-by-value-always","Pass-by-value — always",[15,680,681,682,685,686,689],{},"Java is ",[19,683,684],{},"always pass-by-value",", no exceptions. The subtlety: for objects, the value\ncopied is the ",[19,687,688],{},"reference",", not the object. So a method can mutate the object the\nreference points to, but reassigning the parameter doesn't affect the caller.",[238,691,693],{"className":240,"code":692,"language":242,"meta":243,"style":243},"void mutate(int[] arr) { arr[0] = 99; }    \u002F\u002F changes the caller's array\nvoid reassign(int[] arr) { arr = new int[]{0}; } \u002F\u002F no effect on caller\n\nint[] a = {1};\nmutate(a);    \u002F\u002F a is now {99}\nreassign(a);  \u002F\u002F a is still {99}\n",[28,694,695,726,758,764,782,793],{"__ignoreMap":243},[247,696,697,700,703,705,707,710,712,715,717,720,723],{"class":249,"line":250},[247,698,699],{"class":253},"void",[247,701,702],{"class":391}," mutate",[247,704,520],{"class":256},[247,706,95],{"class":253},[247,708,709],{"class":256},"[] arr) { arr[",[247,711,193],{"class":263},[247,713,714],{"class":256},"] ",[247,716,260],{"class":253},[247,718,719],{"class":263}," 99",[247,721,722],{"class":256},"; }    ",[247,724,725],{"class":270},"\u002F\u002F changes the caller's array\n",[247,727,728,730,733,735,737,740,742,744,747,750,752,755],{"class":249,"line":274},[247,729,699],{"class":253},[247,731,732],{"class":391}," reassign",[247,734,520],{"class":256},[247,736,95],{"class":253},[247,738,739],{"class":256},"[] arr) { arr ",[247,741,260],{"class":253},[247,743,594],{"class":253},[247,745,746],{"class":253}," int",[247,748,749],{"class":256},"[]{",[247,751,193],{"class":263},[247,753,754],{"class":256},"}; } ",[247,756,757],{"class":270},"\u002F\u002F no effect on caller\n",[247,759,760],{"class":249,"line":290},[247,761,763],{"emptyLinePlaceholder":762},true,"\n",[247,765,766,768,771,773,776,779],{"class":249,"line":304},[247,767,95],{"class":253},[247,769,770],{"class":256},"[] a ",[247,772,260],{"class":253},[247,774,775],{"class":256}," {",[247,777,778],{"class":263},"1",[247,780,781],{"class":256},"};\n",[247,783,784,787,790],{"class":249,"line":441},[247,785,786],{"class":391},"mutate",[247,788,789],{"class":256},"(a);    ",[247,791,792],{"class":270},"\u002F\u002F a is now {99}\n",[247,794,796,799,802],{"class":249,"line":795},6,[247,797,798],{"class":391},"reassign",[247,800,801],{"class":256},"(a);  ",[247,803,804],{"class":270},"\u002F\u002F a is still {99}\n",[15,806,807,808,811],{},"Say it crisply: \"Java passes references ",[19,809,810],{},"by value",".\" The reference is copied; both\ncopies point at the same object until one is reassigned.",[10,813,815],{"id":814},"conversions-overflow-and-floating-point","Conversions, overflow, and floating point",[15,817,818,821,822,825],{},[19,819,820],{},"Widening"," (smaller -> larger type) is implicit and safe; ",[19,823,824],{},"narrowing"," requires an\nexplicit cast and truncates (toward zero for floating->integer):",[238,827,829],{"className":240,"code":828,"language":242,"meta":243,"style":243},"long l = 100;        \u002F\u002F widening — automatic\nint n = (int) 3.99;  \u002F\u002F narrowing — explicit; truncates to 3\nbyte b = (byte) 300; \u002F\u002F overflows to 44\n",[28,830,831,849,874],{"__ignoreMap":243},[247,832,833,835,838,840,843,846],{"class":249,"line":250},[247,834,108],{"class":253},[247,836,837],{"class":256}," l ",[247,839,260],{"class":253},[247,841,842],{"class":263}," 100",[247,844,845],{"class":256},";        ",[247,847,848],{"class":270},"\u002F\u002F widening — automatic\n",[247,850,851,853,856,858,860,862,865,868,871],{"class":249,"line":274},[247,852,95],{"class":253},[247,854,855],{"class":256}," n ",[247,857,260],{"class":253},[247,859,214],{"class":256},[247,861,95],{"class":253},[247,863,864],{"class":256},") ",[247,866,867],{"class":263},"3.99",[247,869,870],{"class":256},";  ",[247,872,873],{"class":270},"\u002F\u002F narrowing — explicit; truncates to 3\n",[247,875,876,878,881,883,885,887,889,892,895],{"class":249,"line":290},[247,877,69],{"class":253},[247,879,880],{"class":256}," b ",[247,882,260],{"class":253},[247,884,214],{"class":256},[247,886,69],{"class":253},[247,888,864],{"class":256},[247,890,891],{"class":263},"300",[247,893,894],{"class":256},"; ",[247,896,897],{"class":270},"\u002F\u002F overflows to 44\n",[15,899,900,901,904,905,908,909,912,913,194,915,918,919,922,923,925,926,928,929,932,933,938,939,473],{},"Integer arithmetic ",[19,902,903],{},"wraps silently"," on overflow (",[28,906,907],{},"Integer.MAX_VALUE + 1"," is\n",[28,910,911],{},"Integer.MIN_VALUE",") — use ",[28,914,108],{},[28,916,917],{},"Math.addExact",", or ",[28,920,921],{},"BigInteger"," when that matters.\nAnd ",[28,924,124],{},"\u002F",[28,927,139],{}," are binary IEEE-754, so ",[28,930,931],{},"0.1 + 0.2 != 0.3","; use ",[19,934,935],{},[28,936,937],{},"BigDecimal","\n(constructed from a String) for exact decimals, and never compare floats with ",[28,940,30],{},[15,942,943,944,946,947,949,950,953,954,957,958,953,961,473],{},"In expressions, operands smaller than ",[28,945,95],{}," promote to ",[28,948,95],{},", and integer division\ntruncates — ",[28,951,952],{},"5 \u002F 2"," is ",[28,955,956],{},"2",", while ",[28,959,960],{},"5 \u002F 2.0",[28,962,963],{},"2.5",[10,965,967],{"id":966},"var-final-and-static","var, final, and static",[15,969,970,973,974,977,978,980,981,984,985,988],{},[28,971,972],{},"var"," (Java 10+) is ",[19,975,976],{},"local"," type inference — still statically typed, just less verbose,\nand only for local variables with an initializer. ",[28,979,486],{}," means assign-once: for a\nreference it fixes which object the variable points to, not the object's contents.\n",[28,982,983],{},"static"," binds a member to the ",[19,986,987],{},"class"," (one shared copy) rather than each instance.",[238,990,992],{"className":240,"code":991,"language":242,"meta":243,"style":243},"var list = new ArrayList\u003CString>(); \u002F\u002F inferred ArrayList\u003CString>\nfinal List\u003CString> xs = new ArrayList\u003C>();\nxs.add(\"ok\");   \u002F\u002F mutating allowed\nxs = new ArrayList\u003C>(); \u002F\u002F can't reassign a final binding\n",[28,993,994,1016,1035,1054],{"__ignoreMap":243},[247,995,996,998,1001,1003,1005,1008,1010,1013],{"class":249,"line":250},[247,997,972],{"class":253},[247,999,1000],{"class":256}," list ",[247,1002,260],{"class":253},[247,1004,594],{"class":253},[247,1006,1007],{"class":256}," ArrayList\u003C",[247,1009,185],{"class":253},[247,1011,1012],{"class":256},">(); ",[247,1014,1015],{"class":270},"\u002F\u002F inferred ArrayList\u003CString>\n",[247,1017,1018,1020,1023,1025,1028,1030,1032],{"class":249,"line":274},[247,1019,486],{"class":253},[247,1021,1022],{"class":256}," List\u003C",[247,1024,185],{"class":253},[247,1026,1027],{"class":256},"> xs ",[247,1029,260],{"class":253},[247,1031,594],{"class":253},[247,1033,1034],{"class":256}," ArrayList\u003C>();\n",[247,1036,1037,1040,1043,1045,1048,1051],{"class":249,"line":290},[247,1038,1039],{"class":256},"xs.",[247,1041,1042],{"class":391},"add",[247,1044,520],{"class":256},[247,1046,1047],{"class":506},"\"ok\"",[247,1049,1050],{"class":256},");   ",[247,1052,1053],{"class":270},"\u002F\u002F mutating allowed\n",[247,1055,1056,1059,1061,1063,1066],{"class":249,"line":304},[247,1057,1058],{"class":256},"xs ",[247,1060,260],{"class":253},[247,1062,594],{"class":253},[247,1064,1065],{"class":256}," ArrayList\u003C>(); ",[247,1067,1068],{"class":270},"\u002F\u002F can't reassign a final binding\n",[15,1070,1071,1072,1075,1076,473],{},"Constants are the idiomatic ",[28,1073,1074],{},"static final"," in ",[28,1077,1078],{},"UPPER_SNAKE_CASE",[10,1080,1082],{"id":1081},"recap","Recap",[15,1084,1085,1086,1088,1089,1091,1092,1094,1095,1097,1098,1101,1102,1105,1106,1108,1109,1111,1112,925,1114,925,1116,1118],{},"Java splits the world into ",[19,1087,21],{}," (raw values, never null) and ",[19,1090,25],{},"\n(references). That split explains ",[28,1093,30],{}," vs ",[28,1096,354],{},", the surprising ",[19,1099,1100],{},"Integer cache",",\nand why ",[19,1103,1104],{},"Strings"," (immutable, pooled) must be compared with ",[28,1107,354],{},". Java is\n",[19,1110,684],{}," — it copies references, so methods can mutate but not reassign.\nMind widening vs narrowing, silent integer overflow, and floating-point imprecision, and\nuse ",[28,1113,972],{},[28,1115,486],{},[28,1117,983],{}," deliberately. These fundamentals underpin everything else in\nJava.",[1120,1121,1122],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":243,"searchDepth":274,"depth":274,"links":1124},[1125,1126,1127,1128,1129,1130,1131,1132,1133],{"id":12,"depth":274,"text":13},{"id":38,"depth":274,"text":39},{"id":206,"depth":274,"text":207},{"id":337,"depth":274,"text":338},{"id":476,"depth":274,"text":477},{"id":677,"depth":274,"text":678},{"id":814,"depth":274,"text":815},{"id":966,"depth":274,"text":967},{"id":1081,"depth":274,"text":1082},"Java data types and variables interview questions — primitives vs wrappers, autoboxing, Integer caching, String immutability and the pool, pass-by-value, casting and the var keyword.","easy","md","Java",{},"\u002Fblog\u002Fjava-data-types-variables","\u002Fjava\u002Ffundamentals\u002Fdata-types-variables",{"title":5,"description":1134},"blog\u002Fjava-data-types-variables","Data Types & Variables","Fundamentals","fundamentals","2026-06-18","SpxLpTZXsxLvEBB23QfTe2FRzxE72MIZz8tRsm6LuX0",1781808673081]