[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"navigation":3,"url-settings":86,"blog-\u002Fblog\u002Fan-overview-of-arrays-as-data-structures-in-java":671,"blog-author-\u002Fblog\u002Fan-overview-of-arrays-as-data-structures-in-java":1293,"i-material-symbols:arrow-back-rounded":1308},{"id":4,"extension":5,"footer":6,"header":73,"meta":83,"stem":84,"__hash__":85},"navigation\u002Fdata\u002Fshared\u002Fnavigation.yml","yml",{"brand":7,"columns":13,"legal":63},{"name":8,"tagline":9,"downloadCta":10},"Pieces","The memory layer for modern work.",{"label":11,"href":12},"All downloads","\u002Fdownloads",[14,26,39,51],{"title":15,"links":16},"Product",[17,20,23],{"label":18,"href":19},"Pieces Desktop","\u002F",{"label":21,"href":22},"Pieces Enterprise","\u002Fenterprise",{"label":24,"href":25},"Pieces MCP","\u002Fmcp",{"title":27,"links":28},"Resources",[29,33,36],{"label":30,"href":31,"external":32},"Documentation","url:docs.home",true,{"label":34,"href":35},"Blog","\u002Fblog",{"label":37,"href":38,"external":32},"GitHub","url:github.org",{"title":40,"links":41},"Community",[42,45,48],{"label":43,"href":44,"external":32},"Discord","url:social.discord",{"label":46,"href":47,"external":32},"X \u002F Twitter","url:social.x",{"label":49,"href":50,"external":32},"LinkedIn","url:social.linkedin",{"title":52,"links":53},"Company",[54,57,60],{"label":55,"href":56},"About","\u002Fabout",{"label":58,"href":59},"Updates","\u002Fupdates",{"label":61,"href":62},"Contact","\u002Fcontact",[64,67,70],{"label":65,"href":66},"Privacy Policy","\u002Flegal\u002Fprivacy",{"label":68,"href":69},"Refund Policy","\u002Flegal\u002Frefund",{"label":71,"href":72},"Terms of Service","\u002Flegal\u002Fterms",{"links":74,"signIn":75,"contact":78,"cta":80},[],{"label":76,"href":77},"Manage account","url:portal.home",{"label":79,"href":62},"Get in touch",{"label":81,"href":82},"Download","url:routes.downloads",{},"data\u002Fshared\u002Fnavigation","XlSALC7vYCXHcmcXnjJViwIZKsqnQWF4bn4o9RrcSBE",{"id":87,"extension":5,"links":88,"meta":668,"stem":669,"__hash__":670},"urlSettings\u002Fdata\u002Fshared\u002Furls.yml",[89,93,97,101,105,109,113,117,121,125,129,133,137,141,145,149,153,157,161,165,169,173,177,181,185,189,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276,280,284,288,292,296,300,303,307,311,314,318,322,326,330,334,338,342,346,350,354,358,362,366,370,374,378,382,386,390,394,398,402,406,410,414,418,422,426,430,434,438,442,446,450,454,458,461,465,469,473,477,481,485,488,491,494,497,501,505,508,512,516,520,524,528,532,536,540,544,548,552,556,559,563,567,571,575,579,582,585,588,592,595,599,603,607,611,614,618,622,625,628,631,635,639,643,646,649,652,656,660,664],{"key":90,"label":91,"href":92},"downloads.desktop","Desktop download page","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fdownload",{"key":94,"label":95,"href":96},"downloads.macOS.dmgArm64","macOS DMG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fdmg-arm64\u002Fdownload",{"key":98,"label":99,"href":100},"downloads.macOS.dmgIntel","macOS DMG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fdmg\u002Fdownload",{"key":102,"label":103,"href":104},"downloads.macOS.pkg","macOS PKG","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg\u002Fdownload",{"key":106,"label":107,"href":108},"downloads.macOS.universal","Desktop macOS Universal","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fmacos-universal\u002Fdownload",{"key":110,"label":111,"href":112},"downloads.macOS.pkgArm64","Desktop macOS PKG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pfd-arm64\u002Fdownload",{"key":114,"label":115,"href":116},"downloads.macOS.pkgIntel","Desktop macOS PKG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pfd\u002Fdownload",{"key":118,"label":119,"href":120},"downloads.windows.appinstaller","Windows App Installer","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fappinstaller\u002Fpieces_for_x.appinstaller",{"key":122,"label":123,"href":124},"downloads.windows.exe","Windows EXE","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fwindows-exe\u002Fdownload",{"key":126,"label":127,"href":128},"downloads.windows.msix","Windows MSIX","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fwindows-msix\u002Fdownload",{"key":130,"label":131,"href":132},"downloads.windows.suiteManager","Windows Suite Manager","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_suite_windows\u002Fappinstaller\u002Fdownload",{"key":134,"label":135,"href":136},"downloads.linux.flatpakRepo","Linux Flatpak repository","https:\u002F\u002Fbuilds.pieces.app\u002Fpieces-flatpak-repo\u002Fpieces-flatpak.flatpakrepo",{"key":138,"label":139,"href":140},"downloads.linux.snapDesktop","Linux Snap Desktop","https:\u002F\u002Fsnapcraft.io\u002Fpieces-for-developers",{"key":142,"label":143,"href":144},"downloads.linux.snapPiecesOS","Linux Snap PiecesOS","https:\u002F\u002Fsnapcraft.io\u002Fpieces-os",{"key":146,"label":147,"href":148},"downloads.linux.snap","Desktop Linux Snap package","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fsnap\u002Fdownload",{"key":150,"label":151,"href":152},"downloads.piecesOS.macOS.dmgArm64","PiecesOS macOS DMG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fdmg-arm64\u002Fdownload",{"key":154,"label":155,"href":156},"downloads.piecesOS.macOS.dmgIntel","PiecesOS macOS DMG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fdmg\u002Fdownload",{"key":158,"label":159,"href":160},"downloads.piecesOS.macOS.universal","PiecesOS macOS Universal","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fmacos-universal\u002Fdownload",{"key":162,"label":163,"href":164},"downloads.piecesOS.macOS.pkgArm64","PiecesOS macOS PKG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pos-launch-only-arm64\u002Fdownload",{"key":166,"label":167,"href":168},"downloads.piecesOS.macOS.pkgIntel","PiecesOS macOS PKG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pos-launch-only\u002Fdownload",{"key":170,"label":171,"href":172},"downloads.piecesOS.windows.appinstaller","PiecesOS Windows App Installer","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fappinstaller\u002Fos_server.appinstaller",{"key":174,"label":175,"href":176},"downloads.piecesOS.windows.exe","PiecesOS Windows EXE","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fwindows-exe\u002Fdownload",{"key":178,"label":179,"href":180},"downloads.piecesOS.windows.msix","PiecesOS Windows MSIX","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fwindows-msix\u002Fdownload",{"key":182,"label":183,"href":184},"downloads.piecesOS.linux.snap","PiecesOS Linux Snap package","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fsnap\u002Fdownload",{"key":186,"label":187,"href":188},"downloads.combined.macOS.appleSilicon","Combined macOS installer Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-arm64\u002Fdownload",{"key":190,"label":191,"href":104},"downloads.combined.macOS.intel","Combined macOS installer Intel",{"key":193,"label":194,"href":195},"downloads.guides.macOS","macOS installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Fmacos-installation-guide",{"key":197,"label":198,"href":199},"downloads.guides.windows","Windows installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Fwindows-installation-guide",{"key":201,"label":202,"href":203},"downloads.guides.linux","Linux installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Flinux-installation-guide",{"key":205,"label":206,"href":207},"downloads.guides.linuxFlatpak","Linux Flatpak installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Flinux-installation-guide\u002Fflatpak",{"key":209,"label":210,"href":211},"downloads.guides.linuxSnap","Linux Snap installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Flinux-installation-guide\u002Fsnap",{"key":213,"label":214,"href":215},"downloads.guides.piecesOS","PiecesOS manual installation","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Fmanual-installation",{"key":217,"label":218,"href":219},"extensions.chrome","Chrome extension","https:\u002F\u002Fchrome.google.com\u002Fwebstore\u002Fdetail\u002Fpieces-save-code-snippets\u002Figbgibhbfonhmjlechmeefimncpekepm",{"key":221,"label":222,"href":223},"extensions.firefox","Firefox add-on","https:\u002F\u002Faddons.mozilla.org\u002Fen-US\u002Ffirefox\u002Faddon\u002Fpieces-save-code-from-the-web\u002F",{"key":225,"label":226,"href":227},"extensions.edge","Edge add-on","https:\u002F\u002Fmicrosoftedge.microsoft.com\u002Faddons\u002Fdetail\u002Fpieces-save-code-snippet\u002Fhglfimcdgonaeeobjckfdabcldfidmim",{"key":229,"label":230,"href":231},"extensions.vscode","VS Code extension","https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=MeshIntelligentTechnologiesInc.pieces-vscode",{"key":233,"label":234,"href":235},"extensions.visualStudio","Visual Studio extension","https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=MeshIntelligentTechnologiesInc.PiecesVisualStudio",{"key":237,"label":238,"href":239},"extensions.jetbrains","JetBrains plugin","https:\u002F\u002Fplugins.jetbrains.com\u002Fplugin\u002F17328-pieces--save-search-share--reuse-code-snippets",{"key":241,"label":242,"href":243},"extensions.obsidian","Obsidian plugin","https:\u002F\u002Fobsidian.md\u002Fplugins?id=pieces-for-developers",{"key":245,"label":246,"href":247},"extensions.sublime","Sublime package","https:\u002F\u002Fpackagecontrol.io\u002Fpackages\u002FPieces",{"key":249,"label":250,"href":251},"extensions.neovim","Neovim plugin","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_neo_vim",{"key":253,"label":254,"href":255},"extensions.jupyterlab","JupyterLab plugin","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fjupyterlab-pieces",{"key":257,"label":258,"href":259},"extensions.cli","Pieces CLI","https:\u002F\u002Fpypi.org\u002Fproject\u002Fpieces-cli\u002F",{"key":261,"label":262,"href":263},"docs.home","Documentation home","https:\u002F\u002Fdocs.pieces.app",{"key":265,"label":266,"href":267},"docs.getStarted","Get started docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces",{"key":269,"label":270,"href":271},"docs.api","API docs","https:\u002F\u002Fdocs.pieces.app\u002Fapi",{"key":273,"label":274,"href":275},"docs.desktop.overview","Desktop overview","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop",{"key":277,"label":278,"href":279},"docs.desktop.onboarding","Desktop onboarding","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fonboarding",{"key":281,"label":282,"href":283},"docs.desktop.timeline","Desktop timeline docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Ftimeline",{"key":285,"label":286,"href":287},"docs.desktop.summaries","Desktop summaries docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fsingle-click-summaries",{"key":289,"label":290,"href":291},"docs.desktop.search","Desktop conversational search docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fconversational-search",{"key":293,"label":294,"href":295},"docs.desktop.drive","Desktop drive docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fdrive",{"key":297,"label":298,"href":299},"docs.desktop.account","Desktop account settings docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fconfiguration\u002Faccount",{"key":301,"label":302,"href":92},"docs.desktop.download","Desktop download docs",{"key":304,"label":305,"href":306},"docs.piecesOS.overview","PiecesOS overview docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies",{"key":308,"label":309,"href":310},"docs.piecesOS.details","PiecesOS details docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os",{"key":312,"label":313,"href":215},"docs.piecesOS.install","PiecesOS install docs",{"key":315,"label":316,"href":317},"docs.piecesOS.quickMenu","PiecesOS quick menu docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Fquick-menu",{"key":319,"label":320,"href":321},"docs.piecesOS.storage","On-device storage docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fon-device-storage",{"key":323,"label":324,"href":325},"docs.piecesOS.troubleshooting","PiecesOS troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Ftroubleshooting",{"key":327,"label":328,"href":329},"docs.mcp.overview","MCP overview docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp",{"key":331,"label":332,"href":333},"docs.mcp.cursor","MCP Cursor docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcursor",{"key":335,"label":336,"href":337},"docs.mcp.vscode","MCP VS Code docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fvs-code",{"key":339,"label":340,"href":341},"docs.mcp.claudeDesktop","MCP Claude Desktop docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-desktop",{"key":343,"label":344,"href":345},"docs.mcp.claudeCode","MCP Claude Code docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-code",{"key":347,"label":348,"href":349},"docs.mcp.claudeCowork","MCP Claude Cowork docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-cowork",{"key":351,"label":352,"href":353},"docs.mcp.githubCopilot","MCP GitHub Copilot docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgithub-copilot",{"key":355,"label":356,"href":357},"docs.mcp.goose","MCP Goose docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgoose",{"key":359,"label":360,"href":361},"docs.mcp.windsurf","MCP Windsurf docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fwindsurf",{"key":363,"label":364,"href":365},"docs.mcp.zed","MCP Zed docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fzed",{"key":367,"label":368,"href":369},"docs.mcp.jetbrains","MCP JetBrains docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fjetbrains-ides",{"key":371,"label":372,"href":373},"docs.mcp.continueDev","MCP Continue docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcontinue-dev",{"key":375,"label":376,"href":377},"docs.mcp.cline","MCP Cline docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcline",{"key":379,"label":380,"href":381},"docs.mcp.raycast","MCP Raycast docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fraycast",{"key":383,"label":384,"href":385},"docs.mcp.rovoDevCli","MCP Rovo Dev CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Frovo-dev-cli",{"key":387,"label":388,"href":389},"docs.mcp.openaiCodexCli","MCP OpenAI Codex CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fopenai-codex-cli",{"key":391,"label":392,"href":393},"docs.mcp.googleGeminiCli","MCP Google Gemini CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgoogle-gemini-cli",{"key":395,"label":396,"href":397},"docs.mcp.amazonQ","MCP Amazon Q docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Famazon-q-developer",{"key":399,"label":400,"href":401},"docs.mcp.chatgptDev","MCP ChatGPT Developer Mode docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fchatgpt-developer-mode",{"key":403,"label":404,"href":405},"docs.mcp.openclaw","MCP OpenClaw docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fopenclaw",{"key":407,"label":408,"href":409},"docs.mcp.mcpRemote","MCP Remote docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fmcp-remote",{"key":411,"label":412,"href":413},"docs.mcp.ngrok","MCP ngrok docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fngrok-setup",{"key":415,"label":416,"href":417},"docs.troubleshooting.macOS","macOS troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Fmacos",{"key":419,"label":420,"href":421},"docs.troubleshooting.windows","Windows troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Fwindows",{"key":423,"label":424,"href":425},"docs.troubleshooting.linux","Linux troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Flinux",{"key":427,"label":428,"href":429},"docs.privacy","Privacy and security docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fprivacy-security-your-data",{"key":431,"label":432,"href":433},"docs.support","Support docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fsupport",{"key":435,"label":436,"href":437},"portal.home","Pieces portal","https:\u002F\u002Fportal.pieces.app",{"key":439,"label":440,"href":441},"site.home","Website home","https:\u002F\u002Fpieces.app",{"key":443,"label":444,"href":445},"site.about","About page","https:\u002F\u002Fpieces.app\u002Fabout",{"key":447,"label":448,"href":449},"site.features","Features page","https:\u002F\u002Fpieces.app\u002Ffeatures",{"key":451,"label":452,"href":453},"site.plugins","Plugins page","https:\u002F\u002Fpieces.app\u002Fplugins",{"key":455,"label":456,"href":457},"site.contact","Contact page","https:\u002F\u002Fpieces.app\u002Fcontact",{"key":459,"label":58,"href":460},"site.updates","https:\u002F\u002Fpieces.app\u002Fupdates",{"key":462,"label":463,"href":464},"site.news","News","https:\u002F\u002Fpieces.app\u002Fnews",{"key":466,"label":467,"href":468},"site.events","Community events","https:\u002F\u002Fpieces.app\u002Fcommunity\u002Fevents",{"key":470,"label":471,"href":472},"site.userStories","User stories","https:\u002F\u002Fpieces.app\u002Fuser-stories",{"key":474,"label":475,"href":476},"site.academy","Academy","https:\u002F\u002Fpieces.app\u002Flearn\u002Facademy",{"key":478,"label":479,"href":480},"site.support","Website support","https:\u002F\u002Fpieces.app\u002Fsupport",{"key":482,"label":483,"href":484},"site.standup","Standup","https:\u002F\u002Fpieces.app\u002Fstandup",{"key":486,"label":34,"href":487},"site.blog","https:\u002F\u002Fcode.pieces.app\u002Fblog",{"key":489,"label":43,"href":490},"social.discord","https:\u002F\u002Fdiscord.gg\u002Fgetpieces",{"key":492,"label":46,"href":493},"social.x","https:\u002F\u002Fx.com\u002Fgetpieces",{"key":495,"label":496,"href":493},"social.twitter","Twitter",{"key":498,"label":499,"href":500},"social.instagram","Instagram","https:\u002F\u002Fwww.instagram.com\u002Fgetpieces\u002F",{"key":502,"label":503,"href":504},"social.tiktok","TikTok","https:\u002F\u002Fwww.tiktok.com\u002F@getpieces",{"key":506,"label":49,"href":507},"social.linkedin","https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Fgetpieces\u002F",{"key":509,"label":510,"href":511},"social.youtube","YouTube","https:\u002F\u002Fyoutube.com\u002F@getpieces",{"key":513,"label":514,"href":515},"github.org","GitHub organization","https:\u002F\u002Fgithub.com\u002Fpieces-app",{"key":517,"label":518,"href":519},"github.support","GitHub support","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport",{"key":521,"label":522,"href":523},"github.issues","GitHub issues","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport\u002Fissues",{"key":525,"label":526,"href":527},"github.discussions","GitHub discussions","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport\u002Fdiscussions",{"key":529,"label":530,"href":531},"github.documentation","GitHub documentation","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fdocumentation",{"key":533,"label":534,"href":535},"github.opensource","GitHub open source","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fopensource",{"key":537,"label":538,"href":539},"github.sdks.python","Python SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-python",{"key":541,"label":542,"href":543},"github.sdks.typescript","TypeScript SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-typescript",{"key":545,"label":546,"href":547},"github.sdks.dart","Dart SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-dart",{"key":549,"label":550,"href":551},"github.sdks.kotlin","Kotlin SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-kotlin",{"key":553,"label":554,"href":555},"github.plugins.obsidian","Obsidian plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fobsidian-pieces",{"key":557,"label":558,"href":255},"github.plugins.jupyterlab","JupyterLab plugin repository",{"key":560,"label":561,"href":562},"github.plugins.sublime","Sublime plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_sublime",{"key":564,"label":565,"href":566},"github.plugins.neovim","Neovim plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_neovim",{"key":568,"label":569,"href":570},"github.cliAgent","CLI agent repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fcli-agent",{"key":572,"label":573,"href":574},"github.mcpDart","MCP Dart repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fmcp_dart",{"key":576,"label":577,"href":578},"github.awesomePieces","Awesome Pieces repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fawesome-pieces",{"key":580,"label":581,"href":66},"legal.privacyPolicy","Privacy policy",{"key":583,"label":584,"href":69},"legal.refundPolicy","Refund policy",{"key":586,"label":587,"href":72},"legal.terms","Terms",{"key":589,"label":590,"href":591},"legal.security","Legal security","https:\u002F\u002Fpieces.app\u002Flegal\u002Fsecurity",{"key":593,"label":594,"href":511},"videos.youtubeChannel","YouTube channel",{"key":596,"label":597,"href":598},"videos.gettingStartedDesktop","Getting started desktop video","https:\u002F\u002Fyoutu.be\u002FdUr1lRM_TYk",{"key":600,"label":601,"href":602},"videos.snippetDiscoveryxR","Snippet discovery video","https:\u002F\u002Fyoutu.be\u002FG6vb1USw-30",{"key":604,"label":605,"href":606},"sales.bookACall","Book a sales call","https:\u002F\u002Fcalendar.app.google\u002FWVUDtUfNy5Vst3sH7",{"key":608,"label":609,"href":610},"sales.enterprise","Enterprise form","https:\u002F\u002Fgetpieces.typeform.com\u002Fto\u002FaVQFTvpE",{"key":612,"label":613,"href":527},"sales.feedback","Feedback discussions",{"key":615,"label":616,"href":617},"sales.earlyAccess","Early access form","https:\u002F\u002Fgetpieces.typeform.com\u002Fearlyaccess",{"key":619,"label":620,"href":621},"sales.supportEmail","Support email","mailto:support@pieces.app",{"key":623,"label":624,"href":19},"routes.home","Home route",{"key":626,"label":627,"href":56},"routes.about","About route",{"key":629,"label":630,"href":12},"routes.downloads","Downloads route",{"key":632,"label":633,"href":634},"routes.thanks","Post-install thanks route","\u002Finstall\u002Fthanks",{"key":636,"label":637,"href":638},"routes.pricing","Pricing route","\u002Fpricing",{"key":640,"label":641,"href":642},"cta.freeTrial","Start free trial CTA (Pieces Pro) — used by \u002Fcampaigns\u002F* landing pages","https:\u002F\u002Fcampaigns.pieces.app\u002F",{"key":644,"label":645,"href":22},"routes.enterprise","Enterprise route",{"key":647,"label":648,"href":62},"routes.contact","Contact route",{"key":650,"label":651,"href":59},"routes.updates","Updates route",{"key":653,"label":654,"href":655},"routes.migrationError","Migration error route","\u002Fmigration\u002Ferror",{"key":657,"label":658,"href":659},"routes.authenticated","Post-login authenticated route","\u002Fauth\u002Fsigned-in",{"key":661,"label":662,"href":663},"routes.signed-out","Signed out route","\u002Fauth\u002Fsigned-out",{"key":665,"label":666,"href":667},"routes.authentication-error","Authentication error route","\u002Fauth\u002Ferror",{},"data\u002Fshared\u002Furls","2AvfSWI6bZACH5Kr1ZS3txMLjteRjCjbDR_ul1uRZ9Q",{"id":672,"title":673,"author":674,"authorPhoto":675,"authorPhotoAlt":676,"authorSlug":677,"body":678,"buttonText":676,"buttonUrl":676,"category":1279,"date":1280,"description":1281,"draft":1282,"editorsPick":1282,"extension":1283,"featured":1282,"image":1284,"imageAlt":1285,"meta":1286,"navigation":32,"ogImage":676,"ogImageAlt":676,"path":1287,"seo":1288,"stem":1289,"tags":1290,"__hash__":1292},"blog\u002Fblog\u002Fan-overview-of-arrays-as-data-structures-in-java.md","An Overview of Arrays as Data Structures in Java","Sophia Iroegbu","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Ftop-5-open-source-ai-chatbots-for-developers\u002Fauthor.jpeg",null,"sophia-iroegbu",{"type":679,"value":680,"toc":1256},"minimark",[681,685,690,693,696,712,716,719,724,727,731,734,738,741,745,748,752,760,764,767,776,780,783,787,790,801,810,813,816,820,823,826,832,838,877,881,884,887,893,899,905,909,912,915,921,927,930,936,939,945,949,953,960,963,966,969,975,981,985,991,995,1011,1014,1017,1023,1029,1032,1052,1055,1061,1067,1071,1077,1085,1088,1094,1100,1104,1110,1116,1130,1137,1143,1149,1153,1159,1163,1166,1169,1172,1175,1180,1186,1192,1198,1204,1210,1216,1222,1228,1231,1237,1241,1244,1247],[682,683,684],"p",{},"As a developer, you need to understand data structures and how they can help your tech journey. This article will solely focus on how arrays work as data structures. The primary programming language for this article will be Java.",[686,687,689],"h2",{"id":688},"what-are-data-structures","What are Data Structures?",[682,691,692],{},"Data structures are the formats for organizing, processing, retrieving, and storing data. They are designed to arrange data in a specific way that makes it easy for users to access the data they need.",[682,694,695],{},"Some benefits of data structures include, but are not limited to, the following:",[697,698,699,703,706,709],"ul",{},[700,701,702],"li",{},"They help to secure data",[700,704,705],{},"They help to organize data",[700,707,708],{},"They allow for easy processing of data on a software system",[700,710,711],{},"They help to solve real-life problems.",[686,713,715],{"id":714},"types-of-data-structures","Types of Data Structures",[682,717,718],{},"There are seven data structures every developer should know:",[720,721,723],"h3",{"id":722},"arrays","Arrays",[682,725,726],{},"Arrays are famous data structures. An array is a collection of values that are stored chronologically. Values in an array have zero indexing, i.e., stored values start from 0.",[720,728,730],{"id":729},"linkedlist","LinkedList",[682,732,733],{},"A LinkedList is a data structure with nodes containing a data field that links to the next node in a list. The link is also called a reference.",[720,735,737],{"id":736},"stacks","Stacks",[682,739,740],{},"Stacks are data structures that follow a specific order. The order could either be the First In, Last Out (FILO) or the Last In, First out (LIFO) order. They are also a linear data structure, i.e., the data structure is arranged in a line or follows a straight line trend.",[720,742,744],{"id":743},"queues","Queues",[682,746,747],{},"Queues are a linear data structure that opens at both ends and operations occur in a First In, First Out (FIFO) order.",[720,749,751],{"id":750},"trees","Trees",[682,753,754,755,759],{},"Similar to a family tree, trees are a collection of nodes. Each node of the tree stores a value and links to other nodes (",[756,757,758],"em",{},"children","). This type of data structure, called a hierarchical structure, specializes in efficiently organizing and storing data.",[720,761,763],{"id":762},"heaps","Heaps",[682,765,766],{},"Heaps are unique data structures— they’re entirely binary tree. There are two types of heaps:",[768,769,770,773],"ol",{},[700,771,772],{},"Max heap property: This is where the heap is greater than the child node(s), and the key of the root node is more significant than other nodes.",[700,774,775],{},"Min heap property: This is where the heap is smaller than the child node(s), and the key of the root node is the smallest in the tree.",[720,777,779],{"id":778},"graphs","Graphs",[682,781,782],{},"Graphs are data structures involving vertices (each shape's angular point) and edges. In a data structure, vertices are defined as nodes and edges as lines connecting two nodes. Ultimately, you can say that graphs make a set of vertices (V) and a bunch of edges (E); it’s denoted as G(E, V).",[686,784,786],{"id":785},"arrays-as-a-data-structure","Arrays as a Data Structure",[682,788,789],{},"As mentioned earlier, arrays are a collection of values stored in multiple values in a single variable instead of storing each value in a separate variable. To declare an array in Java, define the variable type followed by square brackets.",[791,792,797],"pre",{"className":793,"code":795,"language":796},[794],"language-text","String[] books:\n","text",[798,799,795],"code",{"__ignoreMap":800},"",[682,802,803],{},[804,805,809],"a",{"href":806,"rel":807},"https:\u002F\u002Fsophyia.pieces.cloud\u002F?p=c38743878e",[808],"nofollow","Save this code",[682,811,812],{},"An example of an array is a carton of eggs, because a carton has eggs lined up in a sequence and each section holds an egg.",[682,814,815],{},"Arrays are commonly used to build other, more complicated data structures. They are also used for sorting algorithms.",[720,817,819],{"id":818},"multi-dimensional-arrays","Multi-dimensional arrays",[682,821,822],{},"These are simply arrays of arrays, which means one array inside another—multi-dimensional arrays store values\u002Felements in a tabular form.",[682,824,825],{},"The syntax of multi-dimensional arrays:",[791,827,830],{"className":828,"code":829,"language":796},[794],"data_type[1st dimension][2nd dimension][]..[Nth dimension]array_name = new data_type[size1][size2]….[sizeN];\n",[798,831,829],{"__ignoreMap":800},[682,833,834],{},[804,835,809],{"href":836,"rel":837},"https:\u002F\u002Fsophyia.pieces.cloud\u002F?p=2a1b459dc1",[808],[697,839,840,856,862,868],{},[700,841,842,845,846,849,850,849,853],{},[798,843,844],{},"data_type"," represents the data type, e.g., ",[798,847,848],{},"int",", ",[798,851,852],{},"String",[798,854,855],{},"char",[700,857,858,861],{},[798,859,860],{},"dimension"," represents the dimension of arrays you want to create, e.g., 1D, 2D, etc.",[700,863,864,867],{},[798,865,866],{},"array_name"," represents the name of the array",[700,869,870,849,873,876],{},[798,871,872],{},"size1",[798,874,875],{},"size2"," represent the size of the dimensions",[720,878,880],{"id":879},"two-dimensional-arrays","Two-dimensional arrays",[682,882,883],{},"A two-dimensional array is an array of one-dimensional arrays. It is the simplest form of any multi-dimensional array.",[682,885,886],{},"An example of two multi-dimensional arrays:",[791,888,891],{"className":889,"code":890,"language":796},[794],"class example {\n    public static void main(String[] args)\n    {\n        int[][] arr = { { 5, 0 }, { 1, 7 } };\n        for (int i = 0; i \u003C 2; i++) {\n            for (int j = 0; j \u003C 2; j++) {\n                System.out.print(arr[i][j] + \" \");\n            }\n             System.out.println();\n        }\n    }\n}\n",[798,892,890],{"__ignoreMap":800},[682,894,895],{},[896,897,898],"strong",{},"Output:",[791,900,903],{"className":901,"code":902,"language":796},[794],"5 01 7\n",[798,904,902],{"__ignoreMap":800},[720,906,908],{"id":907},"three-dimensional-arrays","Three-dimensional arrays",[682,910,911],{},"A three-dimensional array is a complex form of multi-dimensional array because it has three sides\u002Fdimensions. An easy way to understand it is that this form of a multi-dimensional array is an array of two-dimensional arrays.",[682,913,914],{},"An example of three multi-dimensional arrays:",[791,916,919],{"className":917,"code":918,"language":796},[794],"class example {\n  public static void main(String[] args) {\n    int[][][] arr = {{{ 5, 0 }, { 1, 7 },{2 , 9}},};\n        for(int i=0; i \u003C arr.length; i++){\n      for(int j=0; j \u003C arr[i].length; j++){\n         for(int k=0; k \u003C arr[i][j].length; k++){\n            System.out.print( arr[i][j][k] + \" \");\n         }\n         System.out.println(); \n      }\n      System.out.println(); \n    }\n  }\n}\n",[798,920,918],{"__ignoreMap":800},[682,922,923],{},[804,924,809],{"href":925,"rel":926},"https:\u002F\u002Fsophyia.pieces.cloud\u002F?p=9f534cab37",[808],[682,928,929],{},"If we execute the code above, the output is:",[791,931,934],{"className":932,"code":933,"language":796},[794],"5 0\n1 7\n2 9\n",[798,935,933],{"__ignoreMap":800},[682,937,938],{},"In Java, the size of a multi-dimensional array is the total number of elements stored, which means multi-dimensional arrays can be calculated by multiplying the dimensions' length.",[682,940,941,944],{},[896,942,943],{},"Note:"," The best way to display the data in a multi-dimensional array is by using nested or double nested for-loops, as the case may be.",[686,946,948],{"id":947},"arraylists-lists-interface","ArrayLists & Lists Interface",[720,950,952],{"id":951},"arraylists","ArrayLists",[682,954,955,956,959],{},"ArrayLists are data structures that wrap around an array and offer basic functionality. Some functionalities are adding and removing elements and checking if an array contains an element; it is part of the Java collection framework and is the ",[798,957,958],{},"java.util"," package.",[682,961,962],{},"Sometimes, ArrayLists may be slower than standard arrays. Still, they’re helpful in programs where many arrays' manipulations occur.",[682,964,965],{},"One key advantage of an ArrayList is that, unlike an array, you can declare an ArrayList regardless of size. If you do not know the extent of elements to be stored, you can use an ArrayList.",[682,967,968],{},"This is a code snippet of an ArrayList without declaring the size:",[791,970,973],{"className":971,"code":972,"language":796},[794],"import java.io.*;\nimport java.util.*;\nclass example {\n        public static void main(String[] args)\n        {\n                ArrayList bags = new ArrayList\u003C>();\n                for (int i = 1; i \u003C= 7; i++)\n                        bags.add(i);\n                System.out.println(bags);\n                bags.remove(3);\n                System.out.println(bags);\n                for (int i = 0; i \u003C bags.size(); i++)\n                        System.out.print(bags.get(i) + \" \");\n        }\n}\n",[798,974,972],{"__ignoreMap":800},[682,976,977],{},[804,978,809],{"href":979,"rel":980},"https:\u002F\u002Fsophyia.pieces.cloud\u002F?p=ebcf4e8043",[808],[682,982,983],{},[896,984,898],{},[791,986,989],{"className":987,"code":988,"language":796},[794],"[1, 2, 3, 4, 5, 6, 7]\n[1, 2, 3, 5, 6, 7]\n1 2 3 5 6 7\n",[798,990,988],{"__ignoreMap":800},[720,992,994],{"id":993},"list-interface","List Interface",[682,996,997,998,1003,1004,1006,1007,1010],{},"In Java, Lists are interfaces that provide a way to store an ordered ",[804,999,1002],{"href":1000,"rel":1001},"https:\u002F\u002Fwww.javatpoint.com\u002Fcollections-in-java",[808],"collection",". They are a child interface of Collection. Lists are ordered collections of objects\u002Felements where duplicate values are stored. Similar to Arrays and ArrayLists, Lists allow for the insertion of elements and access to the position of elements. Also, the Lists interface is seen in the ",[798,1005,958],{}," package and inherits the ",[798,1008,1009],{},"Collection"," interface.",[682,1012,1013],{},"Since Lists are interface inheritors, Lists can't create objects. You will need a class to create an object; that is where ArrayList comes into play.",[682,1015,1016],{},"Here is an example of using an ArrayList to create a List object:",[791,1018,1021],{"className":1019,"code":1020,"language":796},[794],"List list = new ArrayList ();\n",[798,1022,1020],{"__ignoreMap":800},[682,1024,1025],{},[804,1026,809],{"href":1027,"rel":1028},"https:\u002F\u002Fsophyia.pieces.cloud\u002F?p=9d18439d79",[808],[682,1030,1031],{},"Some of the operations in a List Interface include:",[697,1033,1034,1040,1046],{},[700,1035,1036,1039],{},[896,1037,1038],{},"add(),"," adds elements to the List Interface; it takes two parameters.",[700,1041,1042,1045],{},[896,1043,1044],{},"add(Object),"," adds an element at the end of a List.",[700,1047,1048,1051],{},[896,1049,1050],{},"add(int index, Object)",", adds an element at a specific index in the List.",[682,1053,1054],{},"Here is a code snippet showing how to add an element at a specific index:",[791,1056,1059],{"className":1057,"code":1058,"language":796},[794],"import java.util.*;\nclass example {\n        public static void main(String args[])\n        {\n                List txt = new ArrayList\u003C>();\n                txt.add(\"Pieces\");\n                txt.add(\"Pieces\");\n                txt.add(2, \"Code\");\n                System.out.println(txt);\n        }\n}\n",[798,1060,1058],{"__ignoreMap":800},[682,1062,1063],{},[804,1064,809],{"href":1065,"rel":1066},"https:\u002F\u002Fsophyia.pieces.cloud\u002F?p=26c84ea8aa",[808],[682,1068,1069],{},[896,1070,898],{},[791,1072,1075],{"className":1073,"code":1074,"language":796},[794],"[Pieces, Pieces, Code]\n",[798,1076,1074],{"__ignoreMap":800},[697,1078,1079],{},[700,1080,1081,1084],{},[896,1082,1083],{},"set():"," updates the List interface; it takes one parameter, the List's index.",[682,1086,1087],{},"Here is a code snippet:",[791,1089,1092],{"className":1090,"code":1091,"language":796},[794],"import java.util.*;\nclass example {\n        public static void main(String args[])\n        {\n                List txt = new ArrayList\u003C>();\n                txt.add(\"Pieces\");\n                txt.add(\"Pieces\");\n                txt.add(2, \"Code\");\n                System.out.println(\"Initial ArrayList \" + txt);\n        txt.set(1, \"Random\");\n          System.out.println(\"Updated ArrayList \" + txt);\n    }\n}\n",[798,1093,1091],{"__ignoreMap":800},[682,1095,1096],{},[804,1097,809],{"href":1098,"rel":1099},"https:\u002F\u002Fsophyia.pieces.cloud\u002F?p=656148ba92",[808],[682,1101,1102],{},[896,1103,898],{},[791,1105,1108],{"className":1106,"code":1107,"language":796},[794],"Initial ArrayList [Pieces, Pieces, Code]Updated ArrayList [Pieces, Random, Code]\n",[798,1109,1107],{"__ignoreMap":800},[682,1111,1112,1115],{},[896,1113,1114],{},"remove():"," removes an element from the List Interface; it takes two parameters.",[697,1117,1118,1124],{},[700,1119,1120,1123],{},[896,1121,1122],{},"remove(Object):"," removes an element at the end of a List. If there is more than one Object, the method will remove the first Object.",[700,1125,1126,1129],{},[896,1127,1128],{},"remove(int index, Object):"," removes an element at a specific index in the List.",[682,1131,1132,1133,1136],{},"Here is a code snippet explaining how the ",[798,1134,1135],{},"remove()"," method works:",[791,1138,1141],{"className":1139,"code":1140,"language":796},[794],"import java.util.*;\nclass example {\n        public static void main(String args[])\n        {\n                List txt = new ArrayList\u003C>();\n                txt.add(\"Pieces\");\n                txt.add(\"Pieces\");\n                txt.add(2, \"Code\");\n                System.out.println(\"Initial ArrayList \" + txt);\n        txt.remove(1);\n        System.out.println(\"After the Index Removal \" + txt);\n        txt.remove(\"Pieces\");\n        System.out.println(\"After the Object Removal \"\n                           + txt);\n    }\n}\n",[798,1142,1140],{"__ignoreMap":800},[682,1144,1145],{},[804,1146,809],{"href":1147,"rel":1148},"https:\u002F\u002Fsophyia.pieces.cloud\u002F?p=49de48aae4",[808],[682,1150,1151],{},[896,1152,898],{},[791,1154,1157],{"className":1155,"code":1156,"language":796},[794],"Initial ArrayList [Pieces, Pieces, Code]\nAfter the Index Removal [Pieces, Code]\nAfter the Object Removal [Code]\n",[798,1158,1156],{"__ignoreMap":800},[686,1160,1162],{"id":1161},"code-challenge","Code Challenge",[682,1164,1165],{},"Now that you know the basics of an Array, an ArrayList, Multi-dimensional arrays and Lists, it’s time to test your knowledge! This section will create an identity matrix in Java to give you a visual understanding of how Arrays in Java work.",[682,1167,1168],{},"Before you start, remember that the identity matrix is a square matrix where all elements of the main diagonal are 1s, and other elements are 0s. Also, a key note about the identity matrix is that it remains unchanged if multiplied by itself.",[682,1170,1171],{},"Let’s begin!",[682,1173,1174],{},"The logic of creating an identity matrix is simple. You will need to print 1 in positions where rows are equal to the column of the matrix and make the other position 0. This guide will create an identity matrix of 8; you may use any size you see fit.",[768,1176,1177],{},[700,1178,1179],{},"First, create an instance variable for the row and column.",[791,1181,1184],{"className":1182,"code":1183,"language":796},[794],"class Matrix {     \n      static int identity_matrix(int num)\n        {\n                int row, col; \n}\n",[798,1185,1183],{"__ignoreMap":800},[682,1187,1188],{},[804,1189,809],{"href":1190,"rel":1191},"https:\u002F\u002Fsophyia.pieces.cloud\u002F?p=a05840a01a",[808],[768,1193,1195],{"start":1194},2,[700,1196,1197],{},"Next, use nested for-loops to fill the matrix with 1s and 0s; if your row is equal to your column, add 1, otherwise, add 0. Then, print your matrix.",[791,1199,1202],{"className":1200,"code":1201,"language":796},[794],"class Matrix {\n        static int identity_matrix(int num)\n        {\n                int row, col;\n                for (row = 0; row \u003C num; row++)\n                {\n                        for (col = 0; col \u003C num; col++)\n                        {\n                                if (row == col)\n                                        System.out.print( 1+\" \");\n                                else\n                                        System.out.print( 0+\" \");\n                        }\n                        System.out.println();\n                }\n                return 0;\n        }\n}\n",[798,1203,1201],{"__ignoreMap":800},[682,1205,1206],{},[804,1207,809],{"href":1208,"rel":1209},"https:\u002F\u002Fsophyia.pieces.cloud\u002F?p=cef146a6c0",[808],[768,1211,1213],{"start":1212},3,[700,1214,1215],{},"Finally, define the size of your identity matrix. The final result will look like this:",[791,1217,1220],{"className":1218,"code":1219,"language":796},[794],"class matrix {\n        static int identity_matrix(int num)\n        {\n                int row, col;\n                for (row = 0; row \u003C num; row++)\n                {\n                        for (col = 0; col \u003C num; col++)\n                        {\n                                if (row == col)\n                                        System.out.print( 1+\" \");\n                                else\n                                        System.out.print( 0+\" \");\n                        }\n                        System.out.println();\n                }\n                return 0;\n        }\n        public static void main(String args[])\n        {\n                int size = 8;\n                identity_matrix(size);\n        }\n}\n",[798,1221,1219],{"__ignoreMap":800},[682,1223,1224],{},[804,1225,809],{"href":1226,"rel":1227},"https:\u002F\u002Fsophyia.pieces.cloud\u002F?p=063e438dcf",[808],[682,1229,1230],{},"Your output should be similar to this.",[791,1232,1235],{"className":1233,"code":1234,"language":796},[794],"1 0 0 0 0 0 0 0\n0 1 0 0 0 0 0 0\n0 0 1 0 0 0 0 0\n0 0 0 1 0 0 0 0\n0 0 0 0 1 0 0 0\n0 0 0 0 0 1 0 0\n0 0 0 0 0 0 1 0\n0 0 0 0 0 0 0 1\n",[798,1236,1234],{"__ignoreMap":800},[686,1238,1240],{"id":1239},"conclusion","Conclusion",[682,1242,1243],{},"Arrays are index sequences of values of the same data types and are fixed, which limits their methods. Unlike arrays, ArrayLists are not restricted by size and flexibility.",[682,1245,1246],{},"As a software developer, you will come across arrays more often than other data structures as they are the most straightforward and widely used data structures.",[682,1248,1249,1250,1255],{},"Now you understand using arrays as a data structure and you’ve practiced using them. You can check out the ",[804,1251,1254],{"href":1252,"rel":1253},"https:\u002F\u002Fdocs.oracle.com\u002Fen\u002Fjava\u002F",[808],"Java documentation"," to read more about the other data structures mentioned in this article.",{"title":800,"searchDepth":1194,"depth":1194,"links":1257},[1258,1259,1268,1273,1277,1278],{"id":688,"depth":1194,"text":689},{"id":714,"depth":1194,"text":715,"children":1260},[1261,1262,1263,1264,1265,1266,1267],{"id":722,"depth":1212,"text":723},{"id":729,"depth":1212,"text":730},{"id":736,"depth":1212,"text":737},{"id":743,"depth":1212,"text":744},{"id":750,"depth":1212,"text":751},{"id":762,"depth":1212,"text":763},{"id":778,"depth":1212,"text":779},{"id":785,"depth":1194,"text":786,"children":1269},[1270,1271,1272],{"id":818,"depth":1212,"text":819},{"id":879,"depth":1212,"text":880},{"id":907,"depth":1212,"text":908},{"id":947,"depth":1194,"text":948,"children":1274},[1275,1276],{"id":951,"depth":1212,"text":952},{"id":993,"depth":1212,"text":994},{"id":1161,"depth":1194,"text":1162},{"id":1239,"depth":1194,"text":1240},"Software Development","2023-01-30T00:00:00.000Z","As a developer, you need to understand data structures and how they can help your tech journey. This article focuses on how arrays work as data structures.",false,"md","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fan-overview-of-arrays-as-data-structures-in-java\u002Fhero.jpeg","decorative cover image showing a patterned structure",{},"\u002Fblog\u002Fan-overview-of-arrays-as-data-structures-in-java",{"title":673,"description":1281},"blog\u002Fan-overview-of-arrays-as-data-structures-in-java",[1291],"java-0; arrays","zIHA5oC5VmgN_6iaYAJtftAwEA7kiDN-0VnrKDWFvi4",{"id":1294,"title":674,"body":1295,"description":1299,"draft":1282,"extension":1283,"meta":1302,"navigation":32,"path":1303,"photo":1304,"photoAlt":676,"seo":1305,"stem":1306,"__hash__":1307},"authors\u002Fauthors\u002Fsophia-iroegbu.md",{"type":679,"value":1296,"toc":1300},[1297],[682,1298,1299],{},"Sophia is a Backend Engineer and Technical Writer who brings a unique blend of technical expertise and strong communication skills to every project.",{"title":800,"searchDepth":1194,"depth":1194,"links":1301},[],{},"\u002Fauthors\u002Fsophia-iroegbu","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fauthors\u002Fsophia-iroegbu.jpg",{"title":674,"description":1299},"authors\u002Fsophia-iroegbu","uD0gneoN161lI_x5gvltTdCvcxhwYtI0_Xh1I94IpDE",{"left":1309,"top":1309,"width":1310,"height":1310,"rotate":1309,"vFlip":1282,"hFlip":1282,"body":1311},0,24,"\u003Cpath fill=\"currentColor\" d=\"m7.825 13l4.9 4.9q.3.3.288.7t-.313.7q-.3.275-.7.288t-.7-.288l-6.6-6.6q-.15-.15-.213-.325T4.426 12t.063-.375t.212-.325l6.6-6.6q.275-.275.688-.275t.712.275q.3.3.3.713t-.3.712L7.825 11H19q.425 0 .713.288T20 12t-.288.713T19 13z\"\u002F>"]