diff --git a/package.json b/package.json index e38ee0b2f..1ca7192c2 100644 --- a/package.json +++ b/package.json @@ -81,6 +81,7 @@ "zustand": "^4.5.5" }, "devDependencies": { + "@ai-sdk/google": "^1.1.19", "@playwright/test": "^1.48.0", "@tailwindcss/typography": "^0.5.15", "@types/dom-to-image": "^2.6.7", @@ -91,6 +92,7 @@ "@types/react-slick": "^0.23.13", "@types/sanitize-html": "^2.13.0", "@types/turndown": "^5.0.5", + "ai": "^4.1.51", "csv-parser": "^3.0.0", "gh-pages": "^6.2.0", "js-yaml": "^4.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b1bb5d4de..ddbb8c9f1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -159,6 +159,9 @@ importers: specifier: ^4.5.5 version: 4.5.6(@types/react@18.3.18)(react@18.3.1) devDependencies: + '@ai-sdk/google': + specifier: ^1.1.19 + version: 1.1.19(zod@3.24.1) '@playwright/test': specifier: ^1.48.0 version: 1.50.0 @@ -189,6 +192,9 @@ importers: '@types/turndown': specifier: ^5.0.5 version: 5.0.5 + ai: + specifier: ^4.1.51 + version: 4.1.51(react@18.3.1)(zod@3.24.1) csv-parser: specifier: ^3.0.0 version: 3.1.0 @@ -219,6 +225,46 @@ importers: packages: + '@ai-sdk/google@1.1.19': + resolution: {integrity: sha512-Q4l2iWAADUf1pGbXX60A2nnUqEtPLtLpXsbjr3hVcgI9M3q9BqUmSoGsoJ/AAwvZU3uarEb0IJuv+7zlitvCBw==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.0.0 + + '@ai-sdk/provider-utils@2.1.10': + resolution: {integrity: sha512-4GZ8GHjOFxePFzkl3q42AU0DQOtTQ5w09vmaWUf/pKFXJPizlnzKSUkF0f+VkapIUfDugyMqPMT1ge8XQzVI7Q==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.0.0 + peerDependenciesMeta: + zod: + optional: true + + '@ai-sdk/provider@1.0.9': + resolution: {integrity: sha512-jie6ZJT2ZR0uVOVCDc9R2xCX5I/Dum/wEK28lx21PJx6ZnFAN9EzD2WsPhcDWfCgGx3OAZZ0GyM3CEobXpa9LA==} + engines: {node: '>=18'} + + '@ai-sdk/react@1.1.20': + resolution: {integrity: sha512-4QOM9fR9SryaRraybckDjrhl1O6XejqELdKmrM5g9y9eLnWAfjwF+W1aN0knkSHzbbjMqN77sy9B9yL8EuJbDw==} + engines: {node: '>=18'} + peerDependencies: + react: ^18 || ^19 || ^19.0.0-rc + zod: ^3.0.0 + peerDependenciesMeta: + react: + optional: true + zod: + optional: true + + '@ai-sdk/ui-utils@1.1.16': + resolution: {integrity: sha512-jfblR2yZVISmNK2zyNzJZFtkgX57WDAUQXcmn3XUBJyo8LFsADu+/vYMn5AOyBi9qJT0RBk11PEtIxIqvByw3Q==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.0.0 + peerDependenciesMeta: + zod: + optional: true + '@alloc/quick-lru@5.2.0': resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} @@ -895,6 +941,10 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@opentelemetry/api@1.9.0': + resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==} + engines: {node: '>=8.0.0'} + '@oslojs/encoding@1.1.0': resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==} @@ -1287,6 +1337,9 @@ packages: '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/diff-match-patch@1.0.36': + resolution: {integrity: sha512-xFdR6tkm0MWvBfO8xXCSsinYxHcqkQUlcHeSpMC2ukzOb6lwQAfDmW+Qt0AvlGd8HpsS28qKsB+oPeJn9I39jg==} + '@types/dom-to-image@2.6.7': resolution: {integrity: sha512-me5VbCv+fcXozblWwG13krNBvuEOm6kA5xoa4RrjDJCNFOZSWR3/QLtOXimBHk1Fisq69Gx3JtOoXtg1N1tijg==} @@ -1395,6 +1448,18 @@ packages: resolution: {integrity: sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==} engines: {node: '>= 8.0.0'} + ai@4.1.51: + resolution: {integrity: sha512-CuJgbi2Ktfv/7jjxvUhFOGZ8OFxWQ8a7ZF19lwJuVLauL4uWHLetm6R3iaafahJ8ZkueSbhR/Bnroy5apd1nCw==} + engines: {node: '>=18'} + peerDependencies: + react: ^18 || ^19 || ^19.0.0-rc + zod: ^3.0.0 + peerDependenciesMeta: + react: + optional: true + zod: + optional: true + ansi-align@3.0.1: resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} @@ -1743,6 +1808,9 @@ packages: didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + diff-match-patch@1.0.5: + resolution: {integrity: sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==} + diff@5.2.0: resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} engines: {node: '>=0.3.1'} @@ -1863,6 +1931,10 @@ packages: eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} + eventsource-parser@3.0.0: + resolution: {integrity: sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==} + engines: {node: '>=18.0.0'} + extend-shallow@2.0.1: resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} engines: {node: '>=0.10.0'} @@ -2177,11 +2249,19 @@ packages: engines: {node: '>=6'} hasBin: true + json-schema@0.4.0: + resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} + json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true + jsondiffpatch@0.6.0: + resolution: {integrity: sha512-3QItJOXp2AP1uv7waBkao5nCvhEv+QmJAd38Ybq7wNI74Q+BBmnLn4EDKz6yI9xGAIQoUF87qHt+kc1IVxB4zQ==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -2993,6 +3073,9 @@ packages: resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} engines: {node: '>=4'} + secure-json-parse@2.7.0: + resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} + semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -3121,6 +3204,11 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + swr@2.3.2: + resolution: {integrity: sha512-RosxFpiabojs75IwQ316DGoDRmOqtiAj0tg8wCcbEu4CiLZBs/a9QNtHV7TUfDXmmlgqij/NqzKq/eLelyv9xA==} + peerDependencies: + react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + tailwind-merge@2.6.0: resolution: {integrity: sha512-P+Vu1qXfzediirmHOC3xKGAYeZtPcV9g76X+xg2FD4tYgR71ewMA35Y3sCz3zhiN/dwefRpJX0yBcgwi1fXNQA==} @@ -3136,6 +3224,10 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + throttleit@2.1.0: + resolution: {integrity: sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw==} + engines: {node: '>=18'} + tiny-inflate@1.0.3: resolution: {integrity: sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==} @@ -3413,6 +3505,43 @@ packages: snapshots: + '@ai-sdk/google@1.1.19(zod@3.24.1)': + dependencies: + '@ai-sdk/provider': 1.0.9 + '@ai-sdk/provider-utils': 2.1.10(zod@3.24.1) + zod: 3.24.1 + + '@ai-sdk/provider-utils@2.1.10(zod@3.24.1)': + dependencies: + '@ai-sdk/provider': 1.0.9 + eventsource-parser: 3.0.0 + nanoid: 3.3.8 + secure-json-parse: 2.7.0 + optionalDependencies: + zod: 3.24.1 + + '@ai-sdk/provider@1.0.9': + dependencies: + json-schema: 0.4.0 + + '@ai-sdk/react@1.1.20(react@18.3.1)(zod@3.24.1)': + dependencies: + '@ai-sdk/provider-utils': 2.1.10(zod@3.24.1) + '@ai-sdk/ui-utils': 1.1.16(zod@3.24.1) + swr: 2.3.2(react@18.3.1) + throttleit: 2.1.0 + optionalDependencies: + react: 18.3.1 + zod: 3.24.1 + + '@ai-sdk/ui-utils@1.1.16(zod@3.24.1)': + dependencies: + '@ai-sdk/provider': 1.0.9 + '@ai-sdk/provider-utils': 2.1.10(zod@3.24.1) + zod-to-json-schema: 3.24.1(zod@3.24.1) + optionalDependencies: + zod: 3.24.1 + '@alloc/quick-lru@5.2.0': {} '@ampproject/remapping@2.3.0': @@ -3991,6 +4120,8 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.18.0 + '@opentelemetry/api@1.9.0': {} + '@oslojs/encoding@1.1.0': {} '@pkgjs/parseargs@0.11.0': @@ -4425,6 +4556,8 @@ snapshots: dependencies: '@types/ms': 2.1.0 + '@types/diff-match-patch@1.0.36': {} + '@types/dom-to-image@2.6.7': {} '@types/estree@1.0.6': {} @@ -4534,6 +4667,18 @@ snapshots: dependencies: humanize-ms: 1.2.1 + ai@4.1.51(react@18.3.1)(zod@3.24.1): + dependencies: + '@ai-sdk/provider': 1.0.9 + '@ai-sdk/provider-utils': 2.1.10(zod@3.24.1) + '@ai-sdk/react': 1.1.20(react@18.3.1)(zod@3.24.1) + '@ai-sdk/ui-utils': 1.1.16(zod@3.24.1) + '@opentelemetry/api': 1.9.0 + jsondiffpatch: 0.6.0 + optionalDependencies: + react: 18.3.1 + zod: 3.24.1 + ansi-align@3.0.1: dependencies: string-width: 4.2.3 @@ -4894,6 +5039,8 @@ snapshots: didyoumean@1.2.2: {} + diff-match-patch@1.0.5: {} + diff@5.2.0: {} dir-glob@3.0.1: @@ -5025,6 +5172,8 @@ snapshots: eventemitter3@5.0.1: {} + eventsource-parser@3.0.0: {} + extend-shallow@2.0.1: dependencies: is-extendable: 0.1.1 @@ -5373,8 +5522,16 @@ snapshots: jsesc@3.1.0: {} + json-schema@0.4.0: {} + json5@2.2.3: {} + jsondiffpatch@0.6.0: + dependencies: + '@types/diff-match-patch': 1.0.36 + chalk: 5.4.1 + diff-match-patch: 1.0.5 + jsonfile@6.1.0: dependencies: universalify: 2.0.1 @@ -6427,6 +6584,8 @@ snapshots: extend-shallow: 2.0.1 kind-of: 6.0.3 + secure-json-parse@2.7.0: {} + semver@6.3.1: {} semver@7.6.3: {} @@ -6584,6 +6743,12 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} + swr@2.3.2(react@18.3.1): + dependencies: + dequal: 2.0.3 + react: 18.3.1 + use-sync-external-store: 1.4.0(react@18.3.1) + tailwind-merge@2.6.0: {} tailwindcss@3.4.17: @@ -6621,6 +6786,8 @@ snapshots: dependencies: any-promise: 1.3.0 + throttleit@2.1.0: {} + tiny-inflate@1.0.3: {} tinyexec@0.3.2: {} diff --git a/scripts/gemini-roadmap-content.ts b/scripts/gemini-roadmap-content.ts new file mode 100644 index 000000000..13884982b --- /dev/null +++ b/scripts/gemini-roadmap-content.ts @@ -0,0 +1,181 @@ +import fs from 'node:fs/promises'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import type { Edge, Node } from 'reactflow'; +import matter from 'gray-matter'; +import type { RoadmapFrontmatter } from '../src/lib/roadmap'; +import { slugify } from '../src/lib/slugger'; +import { runPromisesInBatchSequentially } from '../src/lib/promise'; + +import { createGoogleGenerativeAI } from '@ai-sdk/google'; +import { generateText } from 'ai'; + +// ERROR: `__dirname` is not defined in ES module scope +// https://iamwebwiz.medium.com/how-to-fix-dirname-is-not-defined-in-es-module-scope-34d94a86694d +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +// Usage: tsx ./scripts/editor-roadmap-content.ts +const GEMINI_API_KEY = process.env.GEMINI_API_KEY; +console.log('GEMINI_API_KEY:', GEMINI_API_KEY); +const ROADMAP_CONTENT_DIR = path.join(__dirname, '../src/data/roadmaps'); +const roadmapId = process.argv[2]; + +const google = createGoogleGenerativeAI({ + apiKey: process.env.GEMINI_API_KEY, +}); + +const allowedRoadmapIds = await fs.readdir(ROADMAP_CONTENT_DIR); +if (!roadmapId) { + console.error('Roadmap Id is required'); + process.exit(1); +} + +if (!allowedRoadmapIds.includes(roadmapId)) { + console.error(`Invalid roadmap key ${roadmapId}`); + console.error(`Allowed keys are ${allowedRoadmapIds.join(', ')}`); + process.exit(1); +} + +const roadmapFrontmatterDir = path.join( + ROADMAP_CONTENT_DIR, + roadmapId, + `${roadmapId}.md`, +); +const roadmapFrontmatterRaw = await fs.readFile(roadmapFrontmatterDir, 'utf-8'); +const { data } = matter(roadmapFrontmatterRaw); + +const roadmapFrontmatter = data as RoadmapFrontmatter; +if (!roadmapFrontmatter) { + console.error('Invalid roadmap frontmatter'); + process.exit(1); +} + +if (roadmapFrontmatter.renderer !== 'editor') { + console.error('Only Editor Rendered Roadmaps are allowed'); + process.exit(1); +} + +const roadmapDir = path.join( + ROADMAP_CONTENT_DIR, + roadmapId, + `${roadmapId}.json`, +); +const roadmapContent = await fs.readFile(roadmapDir, 'utf-8'); +let { nodes, edges } = JSON.parse(roadmapContent) as { + nodes: Node[]; + edges: Edge[]; +}; +const enrichedNodes = nodes + .filter( + (node) => + node?.type && + ['topic', 'subtopic'].includes(node.type) && + node.data?.label, + ) + .map((node) => { + // Because we only need the parent id and title for subtopics + if (node.type !== 'subtopic') { + return node; + } + + const parentNodeId = + edges.find((edge) => edge.target === node.id)?.source || ''; + const parentNode = nodes.find((n) => n.id === parentNodeId); + + return { + ...node, + parentId: parentNodeId, + parentTitle: parentNode?.data?.label || '', + }; + }) as (Node & { parentId?: string; parentTitle?: string })[]; + +const roadmapContentDir = path.join(ROADMAP_CONTENT_DIR, roadmapId, 'content'); +const stats = await fs.stat(roadmapContentDir).catch(() => null); +if (!stats || !stats.isDirectory()) { + await fs.mkdir(roadmapContentDir, { recursive: true }); +} + +function writeTopicContent( + roadmapTitle: string, + childTopic: string, + parentTopic?: string, +) { + const updatedTitle = roadmapTitle.replace('Roadmap', '').trim().replace('Developer', ''); + let prompt = `I will give you a topic and you need to write a brief introduction for that in "${roadmapTitle}". Your format should be as follows and be in strictly markdown format: + +# (Put a heading for the topic without adding parent "Subtopic in Topic" or "Topic in Roadmap" or "Subtopic under XYZ" etc.) + +(Briefly explain the topic in one paragraph using simple english. Don't start with explaining how important the topic is with regard to "${roadmapTitle}". Don't say something along the lines of "XYZ plays a crucial role in ${roadmapTitle}". Don't include anything saying "In the context of ${roadmapTitle}". Instead, start with a simple explanation of the topic itself. For example, if the topic is "React", you can start with "React is a JavaScript library for building user interfaces."".) +`; + + if (!parentTopic) { + prompt += `First topic is: ${childTopic}`; + } else { + prompt += `First topic is: "${parentTopic} > ${childTopic}"`; + } + + return new Promise((resolve, reject) => { + generateText({ + model: google('gemini-2.0-flash'), + prompt: prompt, + providerOptions: { + } + }) + .then((response) => { + const article = response.text; + + resolve(article); + }) + .catch((err) => { + reject(err); + }); + }); +} + +async function writeNodeContent(node: Node & { parentTitle?: string }) { + const nodeDirPattern = `${slugify(node.data.label)}@${node.id}.md`; + if (!roadmapContentFiles.includes(nodeDirPattern)) { + console.log(`Missing file for: ${nodeDirPattern}`); + return; + } + + const nodeDir = path.join(roadmapContentDir, nodeDirPattern); + const nodeContent = await fs.readFile(nodeDir, 'utf-8'); + const isFileEmpty = !nodeContent.replace(`# ${node.data.label}`, '').trim(); + if (!isFileEmpty) { + console.log(`❌ Ignoring ${nodeDirPattern}. Not empty.`); + return; + } + + const topic = node.data.label; + const parentTopic = node.parentTitle; + + console.log(`⏳ Generating content for ${topic}...`); + let newContentFile = ''; + if (GEMINI_API_KEY) { + newContentFile = (await writeTopicContent( + roadmapFrontmatter.title, + topic, + parentTopic, + )) as string; + } else { + newContentFile = `# ${topic}`; + } + + await fs.writeFile(nodeDir, newContentFile, 'utf-8'); + console.log(`✅ Content generated for ${topic}`); +} + +let roadmapContentFiles = await fs.readdir(roadmapContentDir, { + recursive: true, +}); + +if (!GEMINI_API_KEY) { + console.log('----------------------------------------'); + console.log('GEMINI_API_KEY not found. Skipping gemini api calls...'); + console.log('----------------------------------------'); +} +const promises = enrichedNodes.map((node) => () => writeNodeContent(node)); +await runPromisesInBatchSequentially(promises, 20); +console.log('✅ All content generated'); diff --git a/src/data/roadmaps/java/content/abstraction@qdA6bK9ZkP8p0_NH_wMuj.md b/src/data/roadmaps/java/content/abstraction@qdA6bK9ZkP8p0_NH_wMuj.md index caaa22b36..73f423810 100644 --- a/src/data/roadmaps/java/content/abstraction@qdA6bK9ZkP8p0_NH_wMuj.md +++ b/src/data/roadmaps/java/content/abstraction@qdA6bK9ZkP8p0_NH_wMuj.md @@ -1 +1,8 @@ -# Abstraction \ No newline at end of file +# Abstraction + +The abstract keyword in Java is used to declare a class or a method that cannot be instantiated directly or must be implemented by subclasses, respectively. It is a key part of Java's abstraction mechanism, allowing developers to define abstract classes and methods that provide a blueprint for other classes. + +Visit the following resources to learn more: + +- [@article@Java Abstract Classes](https://jenkov.com/tutorials/java/abstract-classes.html) +- [@article@Java Interfaces vs. Abstract Classes](https://jenkov.com/tutorials/java/interfaces-vs-abstract-classes.html) diff --git a/src/data/roadmaps/java/content/access-specifiers@KYndNwfQcwRCf3zCXOwd_.md b/src/data/roadmaps/java/content/access-specifiers@KYndNwfQcwRCf3zCXOwd_.md index 10026602c..3aeb34a7c 100644 --- a/src/data/roadmaps/java/content/access-specifiers@KYndNwfQcwRCf3zCXOwd_.md +++ b/src/data/roadmaps/java/content/access-specifiers@KYndNwfQcwRCf3zCXOwd_.md @@ -1 +1,7 @@ -# Access Specifiers \ No newline at end of file +# Access Specifiers + +Access specifiers (or access modifiers) in Java are keywords that control the visibility or accessibility of classes, methods, constructors, and other members. They determine from where these members can be accessed. Java provides four access specifiers: `private`, `default` (no keyword), `protected`, and `public`, each offering a different level of access control. + +Visit the following resources to learn more: + +- [@article@Java Access Modifiers](https://jenkov.com/tutorials/java/access-modifiers.html) diff --git a/src/data/roadmaps/java/content/annotations@c--y6GcKj9am0CBdu_Hnt.md b/src/data/roadmaps/java/content/annotations@c--y6GcKj9am0CBdu_Hnt.md index fc5777e45..b81cb1193 100644 --- a/src/data/roadmaps/java/content/annotations@c--y6GcKj9am0CBdu_Hnt.md +++ b/src/data/roadmaps/java/content/annotations@c--y6GcKj9am0CBdu_Hnt.md @@ -1 +1,7 @@ -# Annotations \ No newline at end of file +# Annotations + +Annotations are a form of metadata that provide data about a program. They are used to provide supplemental information about the code, but they are not a part of the program itself. Annotations can be used by the compiler to detect errors or suppress warnings, and they can also be used at runtime to modify the behavior of the program. + +Visit the following resources to learn more: + +- [@article@Java Annotations Tutorial](https://jenkov.com/tutorials/java/annotations.html) \ No newline at end of file diff --git a/src/data/roadmaps/java/content/array-vs-arraylist@a-EQiBUlSgdZba1mW36op.md b/src/data/roadmaps/java/content/array-vs-arraylist@a-EQiBUlSgdZba1mW36op.md index 5d8468a05..d71933617 100644 --- a/src/data/roadmaps/java/content/array-vs-arraylist@a-EQiBUlSgdZba1mW36op.md +++ b/src/data/roadmaps/java/content/array-vs-arraylist@a-EQiBUlSgdZba1mW36op.md @@ -1 +1,8 @@ -# Array vs ArrayList \ No newline at end of file +# Array vs ArrayList + +Arrays and ArrayLists are both ways to store collections of elements in Java. An array is a fixed-size, ordered sequence of elements of the same data type. Once you declare its size, you cannot change it. An ArrayList, on the other hand, is a dynamic, resizable array implementation. It can grow or shrink as needed, allowing you to add or remove elements without worrying about the initial size. + +Visit the following resources to learn more: + +- [@article@Java Arrays](https://jenkov.com/tutorials/java/arrays.html) +- [@article@Java ArrayLists](https://jenkov.com/tutorials/java-collections/list.html) diff --git a/src/data/roadmaps/java/content/arrays@5khApwg1FZ-0qorsLyH-F.md b/src/data/roadmaps/java/content/arrays@5khApwg1FZ-0qorsLyH-F.md index f81681641..fef9dc3d4 100644 --- a/src/data/roadmaps/java/content/arrays@5khApwg1FZ-0qorsLyH-F.md +++ b/src/data/roadmaps/java/content/arrays@5khApwg1FZ-0qorsLyH-F.md @@ -1 +1,8 @@ -# Arrays \ No newline at end of file +# Arrays + +Arrays are fundamental data structures used to store a collection of elements of the same data type in contiguous memory locations. They provide a way to organize and access multiple values using a single variable name and an index. Each element in an array can be accessed directly using its index, starting from 0. + +Visit the following resources to learn more: + +- [@article@Java Arrays](https://jenkov.com/tutorials/java/arrays.html) +- [@video@Java Arrays Tutorial](https://www.youtube.com/watch?v=ei_4Nt7XWOw) \ No newline at end of file diff --git a/src/data/roadmaps/java/content/attributes-and-methods@xTwJYcA6ldgaw3yGmbDEd.md b/src/data/roadmaps/java/content/attributes-and-methods@xTwJYcA6ldgaw3yGmbDEd.md index 51457fac8..073725453 100644 --- a/src/data/roadmaps/java/content/attributes-and-methods@xTwJYcA6ldgaw3yGmbDEd.md +++ b/src/data/roadmaps/java/content/attributes-and-methods@xTwJYcA6ldgaw3yGmbDEd.md @@ -1 +1,9 @@ -# Attributes and Methods \ No newline at end of file +# Attributes and Methods + +Attributes are variables that hold data about an object, defining its state or characteristics. Methods are functions that define the behavior of an object, allowing it to perform actions or operations. Together, attributes and methods encapsulate the data and behavior of an object within a class. + +Visit the following resources to learn more: + +- [@article@Java Classes](https://jenkov.com/tutorials/java/classes.html) +- [@article@Java Methods](https://jenkov.com/tutorials/java/methods.html) +- [@article@Java Properties](https://jenkov.com/tutorials/java-collections/properties.html) diff --git a/src/data/roadmaps/java/content/basics-of-oop@DZ4BX4NYeCQbjGSj56lng.md b/src/data/roadmaps/java/content/basics-of-oop@DZ4BX4NYeCQbjGSj56lng.md index 0c66c47a0..c9b3dfe01 100644 --- a/src/data/roadmaps/java/content/basics-of-oop@DZ4BX4NYeCQbjGSj56lng.md +++ b/src/data/roadmaps/java/content/basics-of-oop@DZ4BX4NYeCQbjGSj56lng.md @@ -1 +1,7 @@ -# Basics of OOP \ No newline at end of file +# Basics of OOP + +Object-Oriented Programming (OOP) is a programming paradigm centered around "objects," which contain data in the form of fields (attributes) and code in the form of procedures (methods). OOP focuses on creating reusable code by grouping related data and behavior into objects, allowing for modularity, abstraction, inheritance, and polymorphism. These concepts help in organizing and structuring code in a way that mirrors real-world entities and their interactions. + +Visit the following resources to learn more: + +- [@article@Java Classes and Objects](https://jenkov.com/tutorials/java/classes.html) diff --git a/src/data/roadmaps/java/content/bazel@6FMj9tMAQPii_1kLtHJLk.md b/src/data/roadmaps/java/content/bazel@6FMj9tMAQPii_1kLtHJLk.md index 727ab0eff..41507e43e 100644 --- a/src/data/roadmaps/java/content/bazel@6FMj9tMAQPii_1kLtHJLk.md +++ b/src/data/roadmaps/java/content/bazel@6FMj9tMAQPii_1kLtHJLk.md @@ -1 +1,9 @@ -# Bazel \ No newline at end of file +# Bazel + +Bazel is an open-source build and test tool similar to Make, Maven, and Gradle. It uses a human-readable, high-level build language. Bazel supports projects in multiple languages and builds outputs for multiple platforms. It's designed for fast, reliable, and reproducible builds, making it suitable for large codebases and complex projects. + +Visit the following resources to learn more: + +- [@article@Getting started with Bazel](https://bazel.build/start) +- [@article@Build Java Projects with Bazel](https://earthly.dev/blog/build-java-projects-with-bazel/) +- [@article@Introduction to the Bazel Build Tool](https://www.baeldung.com/bazel-build-tool) diff --git a/src/data/roadmaps/java/content/classes-and-objects@LenPrQwxFsE1UVbXO_dE7.md b/src/data/roadmaps/java/content/classes-and-objects@LenPrQwxFsE1UVbXO_dE7.md index 4ab88d34b..a42868dc8 100644 --- a/src/data/roadmaps/java/content/classes-and-objects@LenPrQwxFsE1UVbXO_dE7.md +++ b/src/data/roadmaps/java/content/classes-and-objects@LenPrQwxFsE1UVbXO_dE7.md @@ -1 +1,8 @@ -# Classes and Objects \ No newline at end of file +# Classes and Objects + +Classes are blueprints for creating objects, which are instances of those classes. A class defines the characteristics (attributes) and behaviors (methods) that objects of that class will possess. Think of a class as a template and an object as a specific instance created from that template. + +Visit the following resources to learn more: + +- [@article@Java Class and Objects](https://www.programiz.com/java-programming/class-objects) +- [@article@Java Classes and Objects](https://www.youtube.com/watch?v=IUqKuGNasdM) \ No newline at end of file diff --git a/src/data/roadmaps/java/content/concurrency@shqS9-hg__mkOtnnl_I4l.md b/src/data/roadmaps/java/content/concurrency@shqS9-hg__mkOtnnl_I4l.md index adf6818ed..0710af816 100644 --- a/src/data/roadmaps/java/content/concurrency@shqS9-hg__mkOtnnl_I4l.md +++ b/src/data/roadmaps/java/content/concurrency@shqS9-hg__mkOtnnl_I4l.md @@ -1 +1,8 @@ -# Concurrency \ No newline at end of file +# Concurrency + +Concurrency is the ability of a program to execute multiple tasks seemingly simultaneously. This doesn't necessarily mean they are running at the exact same instant, but rather that their execution overlaps in time. This can be achieved through techniques like multithreading, where a single program is divided into multiple threads that can run concurrently, or through asynchronous programming, where tasks can be started and then the program can continue executing other tasks without waiting for the first task to complete. + +Visit the following resources to learn more: + +- [@article@Java Concurrency and Multithreading Tutorial](https://jenkov.com/tutorials/java-concurrency/index.html) +- [@article@Java Concurrency in Practice](https://www.baeldung.com/java-concurrency) \ No newline at end of file diff --git a/src/data/roadmaps/java/content/cryptography@_wV2VQq6MIY1rVHjK8pfu.md b/src/data/roadmaps/java/content/cryptography@_wV2VQq6MIY1rVHjK8pfu.md index c0bf98cfb..9b6f346be 100644 --- a/src/data/roadmaps/java/content/cryptography@_wV2VQq6MIY1rVHjK8pfu.md +++ b/src/data/roadmaps/java/content/cryptography@_wV2VQq6MIY1rVHjK8pfu.md @@ -1 +1,8 @@ -# Cryptography \ No newline at end of file +# Cryptography + +Cryptography is the practice and study of techniques for secure communication in the presence of adversaries. It involves converting readable data (plaintext) into an unreadable format (ciphertext) through encryption, and then converting the ciphertext back into plaintext through decryption. Cryptography uses algorithms and keys to ensure confidentiality, integrity, authentication, and non-repudiation of information. + +Visit the following resources to learn more: + +- [@article@Java Cryptography Tutorial](https://jenkov.com/tutorials/java-cryptography/index.html) + diff --git a/src/data/roadmaps/java/content/data-types@5g9mmi01WeZ4aDqNzwx_V.md b/src/data/roadmaps/java/content/data-types@5g9mmi01WeZ4aDqNzwx_V.md index 14ec648d3..6e9d62fe9 100644 --- a/src/data/roadmaps/java/content/data-types@5g9mmi01WeZ4aDqNzwx_V.md +++ b/src/data/roadmaps/java/content/data-types@5g9mmi01WeZ4aDqNzwx_V.md @@ -9,8 +9,6 @@ Data Types are divided into two group - Visit the following resources to learn more: -- [@article@What are Data Types & Variables?](https://www.guru99.com/java-variables.html) +- [@article@Java Data Types](https://jenkov.com/tutorials/java/variables.html) +- [@article@What are Data Types & Variables?](https://jenkov.com/tutorials/java/data-types.html) - [@article@Java Variables](https://www.javatpoint.com/java-variables) -- [@article@Learn more about Data types and Variables](https://www.javatpoint.com/java-data-types) -- [@article@Java enums](https://docs.oracle.com/javase/tutorial/java/javaOO/enum.html) -- [@article@Java Records](https://www.baeldung.com/java-record-keyword) diff --git a/src/data/roadmaps/java/content/dependency-injection@zItXmuluDtl6HkTYQ7qMh.md b/src/data/roadmaps/java/content/dependency-injection@zItXmuluDtl6HkTYQ7qMh.md index 9ca060b8a..2519dc026 100644 --- a/src/data/roadmaps/java/content/dependency-injection@zItXmuluDtl6HkTYQ7qMh.md +++ b/src/data/roadmaps/java/content/dependency-injection@zItXmuluDtl6HkTYQ7qMh.md @@ -1 +1,9 @@ -# Dependency Injection \ No newline at end of file +# Dependency Injection + +Dependency Injection (DI) is a design pattern where objects receive their dependencies from external sources rather than creating them themselves. This means a class doesn't have to worry about how to obtain the objects it needs to function; instead, those objects are "injected" into the class, usually through its constructor, setter methods, or interface. This promotes loose coupling and makes code more testable and maintainable. + +Visit the following resources to learn more: + +- [@article@Dependency Injection Tutorial](https://jenkov.com/tutorials/dependency-injection/index.html) +- [@article@Java Dependency Injection Design Pattern Example Tutorial](https://www.digitalocean.com/community/tutorials/java-dependency-injection-design-pattern-example-tutorial) + diff --git a/src/data/roadmaps/java/content/dequeue@DWO2-EPIUeKK5aQGiTuKc.md b/src/data/roadmaps/java/content/dequeue@DWO2-EPIUeKK5aQGiTuKc.md index e665b0db8..3dfb3b99f 100644 --- a/src/data/roadmaps/java/content/dequeue@DWO2-EPIUeKK5aQGiTuKc.md +++ b/src/data/roadmaps/java/content/dequeue@DWO2-EPIUeKK5aQGiTuKc.md @@ -1 +1,8 @@ -# Dequeue \ No newline at end of file +# Dequeue + +A Dequeue (pronounced "dee-queue") is a double-ended queue, a data structure that allows you to add and remove elements from both the front (head) and the back (tail) of the queue. Unlike a regular queue (FIFO - First-In, First-Out), a dequeue provides flexibility for both FIFO and LIFO (Last-In, First-Out) operations. This makes it useful for implementing various algorithms and data management tasks where elements need to be accessed or modified from either end. + +Visit the following resources to learn more: + +- [@article@Java Deque Tutorial](https://jenkov.com/tutorials/java-collections/deque.html) +- [@article@Java Deque](https://www.programiz.com/java-programming/deque) diff --git a/src/data/roadmaps/java/content/encapsulation@iH9wSsOK4a77pS7U0Yu5z.md b/src/data/roadmaps/java/content/encapsulation@iH9wSsOK4a77pS7U0Yu5z.md index d6957a2a1..ae38fae52 100644 --- a/src/data/roadmaps/java/content/encapsulation@iH9wSsOK4a77pS7U0Yu5z.md +++ b/src/data/roadmaps/java/content/encapsulation@iH9wSsOK4a77pS7U0Yu5z.md @@ -1 +1,8 @@ -# Encapsulation \ No newline at end of file +# Encapsulation + +Encapsulation is a fundamental concept in object-oriented programming where data and the methods that operate on that data are bundled together as a single unit. This unit, often a class, hides the internal state of the object from the outside world and only exposes a controlled interface for interacting with it. This protects the data from accidental modification and allows for easier maintenance and modification of the code. + +Visit the following resources to learn more: + +- [@article@Java - Encapsulation](https://www.tutorialspoint.com/java/java_encapsulation.htm) + diff --git a/src/data/roadmaps/java/content/enums@ey1f8IsdAlDv1O3E_tNog.md b/src/data/roadmaps/java/content/enums@ey1f8IsdAlDv1O3E_tNog.md index 1cf9f0037..58ce63d65 100644 --- a/src/data/roadmaps/java/content/enums@ey1f8IsdAlDv1O3E_tNog.md +++ b/src/data/roadmaps/java/content/enums@ey1f8IsdAlDv1O3E_tNog.md @@ -1 +1,8 @@ -# Enums \ No newline at end of file +# Enums + +Enums, short for enumerations, are a special data type in Java that represent a group of named constants. They allow you to define a type that can only take on a specific set of predefined values. This makes your code more readable and less prone to errors by restricting the possible values a variable can hold. + +Visit the following resources to learn more: + +- [@article@Java Enums](https://jenkov.com/tutorials/java/enums.html) +- [@article@Java Enums](https://www.programiz.com/java-programming/enums) diff --git a/src/data/roadmaps/java/content/final-keyword@Ajuc_rHObqMQBXLqRIuxh.md b/src/data/roadmaps/java/content/final-keyword@Ajuc_rHObqMQBXLqRIuxh.md index baa17763d..f64f5859e 100644 --- a/src/data/roadmaps/java/content/final-keyword@Ajuc_rHObqMQBXLqRIuxh.md +++ b/src/data/roadmaps/java/content/final-keyword@Ajuc_rHObqMQBXLqRIuxh.md @@ -1 +1,9 @@ -# Final Keyword \ No newline at end of file +# Final Keyword + +The `final` keyword in Java is a non-access modifier used to apply restrictions on a variable, method, or class. When applied to a variable, it makes the variable's value constant after initialization. When applied to a method, it prevents the method from being overridden in a subclass. When applied to a class, it prevents the class from being subclassed (inherited). + +Visit the following resources to learn more: + +- [@article@Java Final Keyword](https://www.baeldung.com/java-final) +- [@article@How does the final keyword in Java work? I can still modify an object](https://stackoverflow.com/questions/15655012/how-does-the-final-keyword-in-java-work-i-can-still-modify-an-object) + diff --git a/src/data/roadmaps/java/content/functional-composition@1Mk_zXxCCcUoX-gFxtlnf.md b/src/data/roadmaps/java/content/functional-composition@1Mk_zXxCCcUoX-gFxtlnf.md index 0b9d19bb5..ec85f248e 100644 --- a/src/data/roadmaps/java/content/functional-composition@1Mk_zXxCCcUoX-gFxtlnf.md +++ b/src/data/roadmaps/java/content/functional-composition@1Mk_zXxCCcUoX-gFxtlnf.md @@ -1 +1,8 @@ -# Functional Composition \ No newline at end of file +# Functional Composition + +Functional composition is the process of combining two or more functions to produce a new function. The resulting function applies each function in order, passing the output of one function as the input to the next. This allows you to build complex operations by chaining together simpler, reusable functions. + +Visit the following resources to learn more: + +- [@article@Functional Composition in Java](https://jenkov.com/tutorials/java-functional-programming/functional-composition.html) +- [@article@Java Functional Programming](https://www.baeldung.com/java-functional-programming) \ No newline at end of file diff --git a/src/data/roadmaps/java/content/functional-interfaces@SityDdjhhNZ9CO3Tg0VI9.md b/src/data/roadmaps/java/content/functional-interfaces@SityDdjhhNZ9CO3Tg0VI9.md index 0c319350e..585d0a0ab 100644 --- a/src/data/roadmaps/java/content/functional-interfaces@SityDdjhhNZ9CO3Tg0VI9.md +++ b/src/data/roadmaps/java/content/functional-interfaces@SityDdjhhNZ9CO3Tg0VI9.md @@ -1 +1,9 @@ -# Functional Interfaces \ No newline at end of file +# Functional Interfaces + +Functional interfaces are interfaces that contain only one abstract method. They can have multiple default or static methods, but only one method that needs to be implemented. These interfaces can be used with lambda expressions and method references, allowing for concise and readable code when dealing with single-method operations. + +Visit the following resources to learn more: + +- [@article@Java Functional Interfaces](https://jenkov.com/tutorials/java-functional-programming/functional-interfaces.html) +- [@article@Java Functional Interfaces](https://www.baeldung.com/java-8-functional-interfaces) + diff --git a/src/data/roadmaps/java/content/high-order-functions@dz6bCmB4dgA7VVZ448cN6.md b/src/data/roadmaps/java/content/high-order-functions@dz6bCmB4dgA7VVZ448cN6.md index 2c608d592..7459670ac 100644 --- a/src/data/roadmaps/java/content/high-order-functions@dz6bCmB4dgA7VVZ448cN6.md +++ b/src/data/roadmaps/java/content/high-order-functions@dz6bCmB4dgA7VVZ448cN6.md @@ -1 +1,7 @@ -# High Order Functions \ No newline at end of file +# High Order Functions + +High Order Functions are functions that can either accept other functions as arguments or return functions as their results. This capability allows for more flexible and reusable code by enabling you to abstract over operations. Essentially, you can pass behavior as data, making your code more dynamic and adaptable to different situations. + +Visit the following resources to learn more: + +- [@article@Java High Order Functions](https://jenkov.com/tutorials/java-functional-programming/higher-order-functions.html) \ No newline at end of file diff --git a/src/data/roadmaps/java/content/inheritance@PXpPEmCEBUKRjwP3B5LzJ.md b/src/data/roadmaps/java/content/inheritance@PXpPEmCEBUKRjwP3B5LzJ.md index a2e8e0baf..432bbd249 100644 --- a/src/data/roadmaps/java/content/inheritance@PXpPEmCEBUKRjwP3B5LzJ.md +++ b/src/data/roadmaps/java/content/inheritance@PXpPEmCEBUKRjwP3B5LzJ.md @@ -1 +1,8 @@ -# Inheritance \ No newline at end of file +# Inheritance + +Inheritance is a fundamental concept in object-oriented programming where a new class (called a subclass or derived class) acquires properties and behaviors from an existing class (called a superclass or base class). This allows for code reuse and the creation of hierarchical relationships between classes, promoting a more organized and maintainable codebase. The subclass can extend the superclass by adding new attributes and methods or overriding existing ones. + +Visit the following resources to learn more: + +- [@article@Java Inheritance](https://jenkov.com/tutorials/java/inheritance.html) +- [@article@Inheritance in Java with Example](https://www.digitalocean.com/community/tutorials/inheritance-java-example) diff --git a/src/data/roadmaps/java/content/initializer-block@dg_UpaO8TzIN7w_QZ1n-6.md b/src/data/roadmaps/java/content/initializer-block@dg_UpaO8TzIN7w_QZ1n-6.md index d85b56f20..a67445a46 100644 --- a/src/data/roadmaps/java/content/initializer-block@dg_UpaO8TzIN7w_QZ1n-6.md +++ b/src/data/roadmaps/java/content/initializer-block@dg_UpaO8TzIN7w_QZ1n-6.md @@ -1 +1,9 @@ -# Initializer Block \ No newline at end of file +# Initializer Block + +An initializer block in Java is a block of code, enclosed in curly braces `{}` , that is executed when an instance of a class is created. It's used to initialize instance variables or perform setup tasks before the constructor is called. There are two types: instance initializer blocks, which run every time a new object is created, and static initializer blocks, which run only once when the class is first loaded. + +Visit the following resources to learn more: + +- [@article@Static and Instance Initializer Blocks in Java](https://www.baeldung.com/java-static-instance-initializer-blocks) +- [@article@All About Java Instance Initializer Blocks](https://blogs.oracle.com/javamagazine/post/java-instance-initializer-block) +- [@article@What is an initialization block?](https://stackoverflow.com/questions/3987428/what-is-an-initialization-block) diff --git a/src/data/roadmaps/java/content/interfaces@6wTRN2PYC6zM_Txkekx53.md b/src/data/roadmaps/java/content/interfaces@6wTRN2PYC6zM_Txkekx53.md index ae1d147ef..ee89b3172 100644 --- a/src/data/roadmaps/java/content/interfaces@6wTRN2PYC6zM_Txkekx53.md +++ b/src/data/roadmaps/java/content/interfaces@6wTRN2PYC6zM_Txkekx53.md @@ -1 +1,8 @@ -# Interfaces \ No newline at end of file +# Interfaces + +An interface in Java is a blueprint of a class. It specifies a set of methods that a class must implement if it claims to implement the interface. Think of it as a contract: any class that "signs" the contract (implements the interface) agrees to provide specific behaviors (methods). Interfaces can also contain constants (static final variables). They help achieve abstraction and multiple inheritance in Java. + +Visit the following resources to learn more: + +- [@article@Interfaces in Java](https://jenkov.com/tutorials/java/interfaces.html) +- [@article@A Guide to Java Interfaces](https://www.baeldung.com/java-interfaces) diff --git a/src/data/roadmaps/java/content/io-operations@M0ybgK1JCycXhZ1dEpCFo.md b/src/data/roadmaps/java/content/io-operations@M0ybgK1JCycXhZ1dEpCFo.md index ce1ddcaa6..050fe3ef4 100644 --- a/src/data/roadmaps/java/content/io-operations@M0ybgK1JCycXhZ1dEpCFo.md +++ b/src/data/roadmaps/java/content/io-operations@M0ybgK1JCycXhZ1dEpCFo.md @@ -1 +1,7 @@ -# I/O Operations \ No newline at end of file +# I/O Operations + +I/O Operations, short for Input/Output Operations, deal with how a program interacts with the outside world. This involves reading data from sources like files, network connections, or the keyboard, and writing data to destinations such as files, the console, or network sockets. Essentially, it's the mechanism by which a program receives information and sends results. + +Visit the following resources to learn more: + +- [@article@Java IO Tutorial](https://jenkov.com/tutorials/java-io/index.html) diff --git a/src/data/roadmaps/java/content/iterator@-17LFO72I8RKjJRMXct9k.md b/src/data/roadmaps/java/content/iterator@-17LFO72I8RKjJRMXct9k.md index da8403b0a..5e53950f4 100644 --- a/src/data/roadmaps/java/content/iterator@-17LFO72I8RKjJRMXct9k.md +++ b/src/data/roadmaps/java/content/iterator@-17LFO72I8RKjJRMXct9k.md @@ -1 +1,8 @@ -# Iterator \ No newline at end of file +# Iterator + +An Iterator is an object that enables you to traverse through a collection (like a List or Set) one element at a time. It provides a standard way to access elements sequentially without needing to know the underlying structure of the collection. You can use methods like `hasNext()` to check if there's a next element and `next()` to retrieve it. + +Visit the following resources to learn more: + +- [@article@Java Iterator Tutorial](https://jenkov.com/tutorials/java-collections/iterator.html) +- [@article@Java Iterable Tutorial](https://jenkov.com/tutorials/java-collections/iterable.html) diff --git a/src/data/roadmaps/java/content/java-memory-model@wEc7pSVU5G2c6Zqmtb_1k.md b/src/data/roadmaps/java/content/java-memory-model@wEc7pSVU5G2c6Zqmtb_1k.md index f415f0f85..ce8b9a460 100644 --- a/src/data/roadmaps/java/content/java-memory-model@wEc7pSVU5G2c6Zqmtb_1k.md +++ b/src/data/roadmaps/java/content/java-memory-model@wEc7pSVU5G2c6Zqmtb_1k.md @@ -1 +1,7 @@ -# Java Memory Model \ No newline at end of file +# Java Memory Model + +The Java Memory Model (JMM) defines how threads in Java interact with memory. It specifies how and when different threads can see writes to shared variables, addressing issues like data visibility and race conditions in concurrent programs. The JMM ensures that multithreaded Java programs behave predictably across different hardware architectures by establishing rules for memory synchronization and ordering. + +Visit the following resources to learn more: + +- [@article@Java Memory Model](https://jenkov.com/tutorials/java-concurrency/java-memory-model.html) diff --git a/src/data/roadmaps/java/content/javalin@OrkJa48HIDmrLOgCBpimA.md b/src/data/roadmaps/java/content/javalin@OrkJa48HIDmrLOgCBpimA.md index 67245693e..130130868 100644 --- a/src/data/roadmaps/java/content/javalin@OrkJa48HIDmrLOgCBpimA.md +++ b/src/data/roadmaps/java/content/javalin@OrkJa48HIDmrLOgCBpimA.md @@ -1 +1,9 @@ -# Javalin \ No newline at end of file +# Javalin + +Javalin is a lightweight web framework for Java and Kotlin that's designed to be simple, intuitive, and fun to use. It allows developers to quickly build web applications and APIs with minimal boilerplate code. Javalin focuses on providing a straightforward approach to routing, request handling, and response generation, making it a good choice for projects where speed of development and ease of understanding are important. + +Visit the following resources to learn more: + +- [@official@Javalin Website](https://javalin.io/) +- [@article@Creating a REST API with Javalin](https://www.baeldung.com/javalin-rest-microservices) + diff --git a/src/data/roadmaps/java/content/lambda-expressions@00_q6I95eO-PUUrKpPFY8.md b/src/data/roadmaps/java/content/lambda-expressions@00_q6I95eO-PUUrKpPFY8.md index 1ed0f338e..795c57118 100644 --- a/src/data/roadmaps/java/content/lambda-expressions@00_q6I95eO-PUUrKpPFY8.md +++ b/src/data/roadmaps/java/content/lambda-expressions@00_q6I95eO-PUUrKpPFY8.md @@ -1 +1,7 @@ -# Lambda Expressions \ No newline at end of file +# Lambda Expressions + +Lambda expressions are essentially short blocks of code that you can pass around to be executed. They allow you to treat functionality as a method argument, or code as data. Think of them as anonymous methods – methods without a name – that can be written directly in the place where they are needed, making your code more concise and readable, especially when dealing with functional interfaces. + +Visit the following resources to learn more: + +- [@article@Java Lambda Expressions](https://jenkov.com/tutorials/java/lambda-expressions.html) diff --git a/src/data/roadmaps/java/content/lifecycle-of-a-program@QgWalJLIb6Fw0HhN1wb02.md b/src/data/roadmaps/java/content/lifecycle-of-a-program@QgWalJLIb6Fw0HhN1wb02.md index 88bb7cb79..bd10822e7 100644 --- a/src/data/roadmaps/java/content/lifecycle-of-a-program@QgWalJLIb6Fw0HhN1wb02.md +++ b/src/data/roadmaps/java/content/lifecycle-of-a-program@QgWalJLIb6Fw0HhN1wb02.md @@ -1 +1,8 @@ -# Lifecycle of a Program \ No newline at end of file +# Lifecycle of a Program + +In Java, the program lifecycle consists of several distinct phases that work together to execute code. The process begins with developers writing Java source code in `.java` files using an IDE or text editor. This code is then compiled by the Java compiler (javac) into bytecode stored in `.class` files, with syntax and type checking performed during compilation. When the program runs, the Java Virtual Machine (JVM) loads these compiled class files into memory through a process involving loading of binary data, linking for verification and preparation, and initialization of class elements. The JVM then verifies the bytecode's security compliance, performs Just-In-Time (JIT) compilation to translate bytecode into native machine code for better performance, and executes the program instructions while managing system resources. Throughout execution, the JVM handles garbage collection by reclaiming memory from unused objects, and finally releases all resources upon program termination. This architecture enables Java's "write once, run anywhere" capability since the bytecode can execute on any device with a compatible JVM. + +Visit the following resources to learn more: + +- [@article@Life Cycle of a Java Program](https://www.startertutorials.com/corejava/life-cycle-java-program.html) +- [@article@How the JVM Executes Java Code](https://www.cesarsotovalero.net/blog/how-the-jvm-executes-java-code.html) diff --git a/src/data/roadmaps/java/content/map@eKtdDtiJygKQ4PuEylFQY.md b/src/data/roadmaps/java/content/map@eKtdDtiJygKQ4PuEylFQY.md index e0a832930..201854741 100644 --- a/src/data/roadmaps/java/content/map@eKtdDtiJygKQ4PuEylFQY.md +++ b/src/data/roadmaps/java/content/map@eKtdDtiJygKQ4PuEylFQY.md @@ -1 +1,10 @@ -# Map \ No newline at end of file +# Map + +A Map is a data structure that stores data in key-value pairs. Each key is unique, and it maps to a specific value. Think of it like a dictionary where you use a word (the key) to look up its definition (the value). Maps allow you to efficiently retrieve, add, or remove values based on their associated keys. + +Visit the following resources to learn more: + +- [@article@Generic Map in Java](https://jenkov.com/tutorials/java-generics/generic-map.html) +- [@article@Java Map](https://jenkov.com/tutorials/java-collections/map.html) +- [@article@Java ConcurrentMap](https://jenkov.com/tutorials/java-util-concurrent/concurrentmap.html) +- [@article@Java SortedMap](https://jenkov.com/tutorials/java-collections/sortedmap.html) diff --git a/src/data/roadmaps/java/content/math-operations@ziD_XwzJSFQP_3iLjq9pA.md b/src/data/roadmaps/java/content/math-operations@ziD_XwzJSFQP_3iLjq9pA.md index 45db8e182..991e14d54 100644 --- a/src/data/roadmaps/java/content/math-operations@ziD_XwzJSFQP_3iLjq9pA.md +++ b/src/data/roadmaps/java/content/math-operations@ziD_XwzJSFQP_3iLjq9pA.md @@ -1 +1,7 @@ -# Math Operations \ No newline at end of file +# Math Operations + +Math operations involve performing calculations using numbers. These operations include addition, subtraction, multiplication, division, and modulus (finding the remainder). They are fundamental building blocks for solving numerical problems and manipulating data in programming. + +Visit the following resources to learn more: + +- [@article@Java Math](https://jenkov.com/tutorials/java/math-operators-and-math-class.html) diff --git a/src/data/roadmaps/java/content/method-chaining@Ax2ouIZgN1DpPzKDy4fwp.md b/src/data/roadmaps/java/content/method-chaining@Ax2ouIZgN1DpPzKDy4fwp.md index 996e76838..07f22f219 100644 --- a/src/data/roadmaps/java/content/method-chaining@Ax2ouIZgN1DpPzKDy4fwp.md +++ b/src/data/roadmaps/java/content/method-chaining@Ax2ouIZgN1DpPzKDy4fwp.md @@ -1 +1,8 @@ -# Method Chaining \ No newline at end of file +# Method Chaining + +Method chaining is a programming technique where multiple method calls are made sequentially on the same object, one after another, in a single statement. Each method in the chain returns an object, allowing the next method to be called on that returned object. This approach enhances code readability and conciseness by reducing the need for temporary variables and intermediate steps. + +Visit the following resources to learn more: + +- [@article@Java Method Chaining - Java Explained](https://bito.ai/resources/java-method-chaining-java-explained) +- [@stackoverflow@How to achieve method chaining in Java](https://stackoverflow.com/questions/21180269/how-to-achieve-method-chaining-in-java) diff --git a/src/data/roadmaps/java/content/method-overloading--overriding@y-i56f1P_mMdvyBr7J4XE.md b/src/data/roadmaps/java/content/method-overloading--overriding@y-i56f1P_mMdvyBr7J4XE.md index 6b8857935..e7e30f848 100644 --- a/src/data/roadmaps/java/content/method-overloading--overriding@y-i56f1P_mMdvyBr7J4XE.md +++ b/src/data/roadmaps/java/content/method-overloading--overriding@y-i56f1P_mMdvyBr7J4XE.md @@ -1 +1,8 @@ -# Method Overloading / Overriding \ No newline at end of file +# Method Overloading and Overriding + +Method overloading allows you to define multiple methods in the same class with the same name but different parameters (different number, types, or order of parameters). Method overriding, on the other hand, occurs when a subclass provides a specific implementation for a method that is already defined in its superclass. The method signature (name and parameters) must be the same in both the superclass and the subclass for overriding to occur. + +Visit the following resources to learn more: + +- [@article@Overriding vs Overloading in Java](https://www.digitalocean.com/community/tutorials/overriding-vs-overloading-in-java) +- [@article@Java Inheritance Tutorial](https://jenkov.com/tutorials/java/inheritance.html) diff --git a/src/data/roadmaps/java/content/modules@kdxy8Zssnc5lJjdmjUyMc.md b/src/data/roadmaps/java/content/modules@kdxy8Zssnc5lJjdmjUyMc.md index 016d43441..ba36cf7b6 100644 --- a/src/data/roadmaps/java/content/modules@kdxy8Zssnc5lJjdmjUyMc.md +++ b/src/data/roadmaps/java/content/modules@kdxy8Zssnc5lJjdmjUyMc.md @@ -1 +1,8 @@ -# Modules \ No newline at end of file +# Modules + +Modules in Java are a way to organize code into reusable and independent units. They provide a higher level of abstraction than packages, allowing you to control which parts of your code are exposed to other modules and which are kept private. This enhances encapsulation, improves security, and simplifies dependency management by explicitly declaring dependencies between modules. + +Visit the following resources to learn more: + +- [@article@Java Modules](https://jenkov.com/tutorials/java/modules.html) +- [@article@A Guide to Java 9 Modularity](https://www.baeldung.com/java-modularity) diff --git a/src/data/roadmaps/java/content/nested-classes@zDBW20W2XMCtNTG3emJ_A.md b/src/data/roadmaps/java/content/nested-classes@zDBW20W2XMCtNTG3emJ_A.md index 84fd43cef..06cac0c5e 100644 --- a/src/data/roadmaps/java/content/nested-classes@zDBW20W2XMCtNTG3emJ_A.md +++ b/src/data/roadmaps/java/content/nested-classes@zDBW20W2XMCtNTG3emJ_A.md @@ -1 +1,8 @@ -# Nested Classes \ No newline at end of file +# Nested Classes + +Nested classes are classes defined inside another class. The class that contains the inner class is known as the outer class. Nested classes can access members of the outer class, even if they are declared private. They are a way to logically group classes that are only used in one place, increasing encapsulation and maintainability. + +Visit the following resources to learn more: + +- [@article@Java Nested Classes](https://jenkov.com/tutorials/java/nested-classes.html) +- [@article@Guide to Nested Classes in Java](https://www.baeldung.com/java-nested-classes) diff --git a/src/data/roadmaps/java/content/object-lifecycle@3qowgj1pas1X7oRric9eU.md b/src/data/roadmaps/java/content/object-lifecycle@3qowgj1pas1X7oRric9eU.md index 83f2daaa1..c8862834a 100644 --- a/src/data/roadmaps/java/content/object-lifecycle@3qowgj1pas1X7oRric9eU.md +++ b/src/data/roadmaps/java/content/object-lifecycle@3qowgj1pas1X7oRric9eU.md @@ -1 +1,7 @@ -# Object Lifecycle \ No newline at end of file +# Object Lifecycle + +The object lifecycle refers to the series of stages an object goes through from its creation (allocation of memory) to its destruction (reclaiming of memory). These stages typically include object creation, initialization, usage, and eventual garbage collection when the object is no longer needed. Understanding this lifecycle is crucial for efficient memory management and preventing resource leaks. + +Visit the following resources to learn more: + +- [@article@Object Life Cycle in Java](https://www.tpointtech.com/object-life-cycle-in-java) diff --git a/src/data/roadmaps/java/content/optionals@l9fxK8K9fcUqR7hs5TkWU.md b/src/data/roadmaps/java/content/optionals@l9fxK8K9fcUqR7hs5TkWU.md index 264a01f5c..e0b2f03cd 100644 --- a/src/data/roadmaps/java/content/optionals@l9fxK8K9fcUqR7hs5TkWU.md +++ b/src/data/roadmaps/java/content/optionals@l9fxK8K9fcUqR7hs5TkWU.md @@ -1 +1,8 @@ -# Optionals \ No newline at end of file +# Optionals + +Optionals are a container object that may or may not contain a non-null value. They are primarily used to represent the absence of a value, avoiding the need to return null, which can lead to NullPointerExceptions. Optionals provide methods to explicitly check if a value is present and to handle cases where a value is absent in a more controlled and readable manner. + +Visit the following resources to learn more: + +- [@article@Guide To Optionals](https://www.baeldung.com/java-optional) +- [@article@Java Optional](https://dzone.com/articles/optional-in-java) diff --git a/src/data/roadmaps/java/content/pass-by-value--pass-by-reference@3r0Er9XZHovIZz3gNyj4A.md b/src/data/roadmaps/java/content/pass-by-value--pass-by-reference@3r0Er9XZHovIZz3gNyj4A.md index 6151123ab..99028b9a9 100644 --- a/src/data/roadmaps/java/content/pass-by-value--pass-by-reference@3r0Er9XZHovIZz3gNyj4A.md +++ b/src/data/roadmaps/java/content/pass-by-value--pass-by-reference@3r0Er9XZHovIZz3gNyj4A.md @@ -1 +1,8 @@ -# Pass by Value / Pass by Reference \ No newline at end of file +# Pass by Value / Pass by Reference + +Pass by value and pass by reference are two different ways of passing arguments to a function or method. In pass by value, a copy of the variable's value is passed to the function, so any changes made to the parameter inside the function do not affect the original variable. In pass by reference, a direct reference to the variable is passed, meaning that changes made to the parameter inside the function will directly affect the original variable. + +Visit the following resources to learn more: + +- [@article@Java is Pass-by-Value, Not Pass-by-Reference](https://www.baeldung.com/java-pass-by-value-or-pass-by-reference) +- [@article@Is Java "pass-by-reference" or "pass-by-value"?](https://stackoverflow.com/questions/40480/is-java-pass-by-reference-or-pass-by-value) \ No newline at end of file diff --git a/src/data/roadmaps/java/content/queue@ThoWhXb4vUvNfE70_wMfa.md b/src/data/roadmaps/java/content/queue@ThoWhXb4vUvNfE70_wMfa.md index b3125c93f..555c63e03 100644 --- a/src/data/roadmaps/java/content/queue@ThoWhXb4vUvNfE70_wMfa.md +++ b/src/data/roadmaps/java/content/queue@ThoWhXb4vUvNfE70_wMfa.md @@ -1 +1,7 @@ -# Queue \ No newline at end of file +# Queue + +A queue is a fundamental data structure that follows the First-In, First-Out (FIFO) principle. Think of it like a line at a store: the first person to join the line is the first person to be served. Elements are added to the rear (enqueue) and removed from the front (dequeue) of the queue. + +Visit the following resources to learn more: + +- [@article@Java Queue](https://jenkov.com/tutorials/java-collections/queue.html) diff --git a/src/data/roadmaps/java/content/record@VqLV7kolfRFnvOuJAvzlg.md b/src/data/roadmaps/java/content/record@VqLV7kolfRFnvOuJAvzlg.md index b3d22144f..7c83c9a8a 100644 --- a/src/data/roadmaps/java/content/record@VqLV7kolfRFnvOuJAvzlg.md +++ b/src/data/roadmaps/java/content/record@VqLV7kolfRFnvOuJAvzlg.md @@ -1 +1,8 @@ -# Record \ No newline at end of file +# Record + +A record is a special type of class in Java that is designed to hold immutable data. It automatically generates methods like `equals()`, `hashCode()`, and `toString()` based on the components declared in its header, reducing boilerplate code. Records are useful for creating data transfer objects (DTOs) or simple data aggregates where the primary purpose is to store and access data. + +Visit the following resources to learn more: + +- [@article@Java Records](https://jenkov.com/tutorials/java/record.html) +- [@video@Java Records](https://www.youtube.com/watch?v=xs7DiEIHW0U) diff --git a/src/data/roadmaps/java/content/regular-expressions@C7rB3jkshHFN7TkHRJPlz.md b/src/data/roadmaps/java/content/regular-expressions@C7rB3jkshHFN7TkHRJPlz.md index e91b05043..aab5df854 100644 --- a/src/data/roadmaps/java/content/regular-expressions@C7rB3jkshHFN7TkHRJPlz.md +++ b/src/data/roadmaps/java/content/regular-expressions@C7rB3jkshHFN7TkHRJPlz.md @@ -1 +1,7 @@ -# Regular Expressions \ No newline at end of file +# Regular Expressions + +Regular expressions, often shortened to "regex," are sequences of characters that define a search pattern. These patterns are used to match character combinations in strings. They can be used to search, edit, or manipulate text and data. Regular expressions provide a powerful and flexible way to work with text-based data. + +Visit the following resources to learn more: + +- [@article@Java Regular Expressions Tutorial](https://jenkov.com/tutorials/java-regex/index.html) diff --git a/src/data/roadmaps/java/content/set@XjkNd5WJ9yxW48dwHQNkZ.md b/src/data/roadmaps/java/content/set@XjkNd5WJ9yxW48dwHQNkZ.md index b5fdecda9..14ac0c255 100644 --- a/src/data/roadmaps/java/content/set@XjkNd5WJ9yxW48dwHQNkZ.md +++ b/src/data/roadmaps/java/content/set@XjkNd5WJ9yxW48dwHQNkZ.md @@ -1 +1,8 @@ -# Set \ No newline at end of file +# Set + +A Set is a data structure that stores a collection of unique elements. This means that no duplicate values are allowed within a Set. Sets provide efficient ways to check for membership (if an element exists in the set) and perform operations like union, intersection, and difference. + +Visit the following resources to learn more: + +- [@article@Java Set](https://jenkov.com/tutorials/java-collections/set.html) +- [@article@Java Set Interface and Implementation](https://www.digitalocean.com/community/tutorials/java-set) diff --git a/src/data/roadmaps/java/content/stack@DzfE_9WLAp-BrG3C1-MwU.md b/src/data/roadmaps/java/content/stack@DzfE_9WLAp-BrG3C1-MwU.md index 463aa833c..df20fb4ab 100644 --- a/src/data/roadmaps/java/content/stack@DzfE_9WLAp-BrG3C1-MwU.md +++ b/src/data/roadmaps/java/content/stack@DzfE_9WLAp-BrG3C1-MwU.md @@ -1 +1,8 @@ -# Stack \ No newline at end of file +# Stack + +A stack is a fundamental data structure that follows the Last-In, First-Out (LIFO) principle. Imagine a stack of plates; you can only add or remove plates from the top. This means the last element added to the stack is the first one to be removed. Stacks are used to manage function calls, evaluate expressions, and implement undo/redo functionality. + +Visit the following resources to learn more: + +- [@article@Java Stack Tutorial](https://jenkov.com/tutorials/java-collections/stack.html) +- [@article@Guide to Java Stack](https://www.baeldung.com/java-stack) diff --git a/src/data/roadmaps/java/content/static-keyword@ZcNxO6qIXIg7RaWYnZj2e.md b/src/data/roadmaps/java/content/static-keyword@ZcNxO6qIXIg7RaWYnZj2e.md index 37f334bce..00a9e9aef 100644 --- a/src/data/roadmaps/java/content/static-keyword@ZcNxO6qIXIg7RaWYnZj2e.md +++ b/src/data/roadmaps/java/content/static-keyword@ZcNxO6qIXIg7RaWYnZj2e.md @@ -1 +1,9 @@ -# Static Keyword \ No newline at end of file +# Static Keyword + +The `static` keyword in Java is used to create members (variables and methods) that belong to the class itself, rather than to any specific instance of the class. This means there's only one copy of a static variable shared by all objects of that class, and you can access static members directly using the class name without needing to create an object. Static methods can only access static variables and call other static methods. + +Visit the following resources to learn more: + +- [@article@Java Static Keyword Explained With Examples](https://www.freecodecamp.org/news/java-static-keyword-explained/) +- [@article@Static and Non-static Fields in Java](https://jenkov.com/tutorials/java/fields.html#static-and-non-static-fields) +- [@article@Guide to the Java 'static' Keyword](https://www.baeldung.com/java-static) diff --git a/src/data/roadmaps/java/content/static-vs-dynamic-binding@Kjdj862xnz8fqDYE3HKhC.md b/src/data/roadmaps/java/content/static-vs-dynamic-binding@Kjdj862xnz8fqDYE3HKhC.md index 18e42da40..d0fb4293a 100644 --- a/src/data/roadmaps/java/content/static-vs-dynamic-binding@Kjdj862xnz8fqDYE3HKhC.md +++ b/src/data/roadmaps/java/content/static-vs-dynamic-binding@Kjdj862xnz8fqDYE3HKhC.md @@ -1 +1,8 @@ -# Static vs Dynamic Binding \ No newline at end of file +# Static vs Dynamic Binding + +Static binding, also known as early binding, happens at compile time. The compiler knows exactly which method will be called based on the type of the variable. Dynamic binding, or late binding, occurs at runtime. The specific method to be called is determined based on the actual object type, not the variable type, allowing for more flexibility and polymorphism. + +Visit the following resources to learn more: + +- [@article@Static and Dynamic Binding in Java](https://www.baeldung.com/java-static-dynamic-binding) +- [@article@Static and Dynamic Binding in Java with Examples](https://beginnersbook.com/2013/04/java-static-dynamic-binding/) diff --git a/src/data/roadmaps/java/content/strings-and-methods@aEaBobzFWv0mJHGAbgxKY.md b/src/data/roadmaps/java/content/strings-and-methods@aEaBobzFWv0mJHGAbgxKY.md index 66bcdbd1e..740fba62d 100644 --- a/src/data/roadmaps/java/content/strings-and-methods@aEaBobzFWv0mJHGAbgxKY.md +++ b/src/data/roadmaps/java/content/strings-and-methods@aEaBobzFWv0mJHGAbgxKY.md @@ -1 +1,7 @@ -# Strings and Methods \ No newline at end of file +# Strings and Methods + +Strings are sequences of characters, like words or sentences, used to represent text in programming. Methods are actions you can perform on these strings, such as finding their length, changing their case (uppercase or lowercase), or extracting parts of them. These methods allow you to manipulate and work with text data effectively. + +Visit the following resources to learn more: + +- [@article@Java Strings](https://jenkov.com/tutorials/java/strings.html) diff --git a/src/data/roadmaps/java/content/threads@u_YysD7Bpnq-xkFX5yJGz.md b/src/data/roadmaps/java/content/threads@u_YysD7Bpnq-xkFX5yJGz.md index b737487dc..7b4897a22 100644 --- a/src/data/roadmaps/java/content/threads@u_YysD7Bpnq-xkFX5yJGz.md +++ b/src/data/roadmaps/java/content/threads@u_YysD7Bpnq-xkFX5yJGz.md @@ -6,8 +6,5 @@ Writing correct multi-threaded application is complex and it's an advanced topic Visit the following resources to learn more: -- [@article@Threads in Java](https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html) -- [@article@An Introduction to Thread in Java](https://www.simplilearn.com/tutorials/java-tutorial/thread-in-java) -- [@article@How to Create a Thread in Java?](https://www.javatpoint.com/how-to-create-a-thread-in-java) -- [@article@Multithreaded programming is HARD](https://jenkov.com/tutorials/java-concurrency/index.html) +- [@article@Threads in Java](https://jenkov.com/tutorials/java-concurrency/index.html) - [@video@Java Threads Tutorial](https://www.youtube.com/watch?v=TCd8QIS-2KI) diff --git a/src/data/roadmaps/java/content/type-casting@yNDbk6r5wFqBi25xmIRF_.md b/src/data/roadmaps/java/content/type-casting@yNDbk6r5wFqBi25xmIRF_.md index 3410bb6ce..be6545ab4 100644 --- a/src/data/roadmaps/java/content/type-casting@yNDbk6r5wFqBi25xmIRF_.md +++ b/src/data/roadmaps/java/content/type-casting@yNDbk6r5wFqBi25xmIRF_.md @@ -1 +1,8 @@ -# Type Casting \ No newline at end of file +# Type Casting + +Type casting is the process of converting a variable from one data type to another. This is often necessary when you need to perform operations between variables of different types, or when you need to store a value of one type in a variable of another type. In Java, type casting can be either implicit (automatic) or explicit (requiring a cast operator). + +Visit the following resources to learn more: + +- [@article@Type Casting in Java: Everything You Need to Know](https://www.simplilearn.com/tutorials/java-tutorial/type-casting-in-java) +- [@article@Java Type Casting (With Examples)](https://www.programiz.com/java-programming/typecasting) diff --git a/src/data/roadmaps/java/content/variables-and-scopes@VBNcAO0STaZJ1iV9A7utv.md b/src/data/roadmaps/java/content/variables-and-scopes@VBNcAO0STaZJ1iV9A7utv.md index 92a501398..cc76931c4 100644 --- a/src/data/roadmaps/java/content/variables-and-scopes@VBNcAO0STaZJ1iV9A7utv.md +++ b/src/data/roadmaps/java/content/variables-and-scopes@VBNcAO0STaZJ1iV9A7utv.md @@ -1 +1,8 @@ -# Variables and Scopes \ No newline at end of file +# Variables and Scopes + +Variables are like containers that hold data in a program. Each variable has a name, a type (like integer, text, or boolean), and a value. The scope of a variable determines where in your code you can access and use that variable. Understanding scope is crucial to avoid naming conflicts and ensure data is accessed correctly within different parts of your program. + +Visit the following resources to learn more: + +- [@article@Java Variables](https://jenkov.com/tutorials/java/variables.html) +- [@article@Java Variable Scope](https://www.baeldung.com/java-variable-scope) diff --git a/src/data/roadmaps/java/content/virtual-threads@vJSq1GJLIMQ6IIB8CMK8g.md b/src/data/roadmaps/java/content/virtual-threads@vJSq1GJLIMQ6IIB8CMK8g.md index e751a8601..12df348c1 100644 --- a/src/data/roadmaps/java/content/virtual-threads@vJSq1GJLIMQ6IIB8CMK8g.md +++ b/src/data/roadmaps/java/content/virtual-threads@vJSq1GJLIMQ6IIB8CMK8g.md @@ -1 +1,9 @@ -# Virtual Threads \ No newline at end of file +# Virtual Threads + +Virtual Threads are lightweight threads managed by the Java Virtual Machine (JVM). Unlike traditional operating system threads, which are relatively expensive to create and manage, virtual threads are designed to be extremely lightweight, allowing for the creation of millions of them. They are intended to improve the scalability and concurrency of Java applications by making it easier to write code that can handle a large number of concurrent operations without the overhead associated with traditional threads. + +Visit the following resources to learn more: + +- [@article@Java 21 Virtual Threads: Dude, Where's My Lock?](https://netflixtechblog.com/java-21-virtual-threads-dude-wheres-my-lock-3052540e231d) +- [@article@Virtual Thread vs Thread in Java](https://www.baeldung.com/java-virtual-thread-vs-thread) +- [@article@The Ultimate Guide to Java Virtual Threads](https://rockthejvm.com/articles/the-ultimate-guide-to-java-virtual-threads) diff --git a/src/data/roadmaps/java/content/volatile-keyword@U4Wx3MH3LgJLa0n9Ne0Br.md b/src/data/roadmaps/java/content/volatile-keyword@U4Wx3MH3LgJLa0n9Ne0Br.md index e8cecdde7..ca9ceebae 100644 --- a/src/data/roadmaps/java/content/volatile-keyword@U4Wx3MH3LgJLa0n9Ne0Br.md +++ b/src/data/roadmaps/java/content/volatile-keyword@U4Wx3MH3LgJLa0n9Ne0Br.md @@ -1 +1,8 @@ -# volatile keyword \ No newline at end of file +# Volatile Keyword + +The `volatile` keyword in Java is a modifier that can be applied to instance variables. It ensures that all threads see the most up-to-date value of a variable. Without `volatile`, each thread might cache its own copy of the variable, leading to inconsistencies when multiple threads access and modify it concurrently. Using `volatile` forces the thread to read the variable's value directly from main memory, and write changes directly back to main memory, bypassing the thread's local cache. + +Visit the following resources to learn more: + +- [@article@Java Volatile Keyword](https://jenkov.com/tutorials/java-concurrency/volatile.html) +- [@article@Guide to the Volatile Keyword in Java](https://www.baeldung.com/java-volatile)