Home/后端开发/java-fundamentals
J

java-fundamentals

by @pluginagentmarketplacev
4.8(91)

Master the core fundamentals of the Java programming language, including syntax, object-oriented programming, collection framework, and stream operations, laying a solid foundation for building robust backend applications.

JavaObject-Oriented Programming (OOP)JVMSpring FrameworkBackend DevelopmentGitHub
Installation
npx skills add pluginagentmarketplace/custom-plugin-java --skill java-fundamentals
compare_arrows

Before / After Comparison

1
Before

Lacking solid Java fundamental knowledge, it's difficult to efficiently apply features like object-oriented programming, collections, streams, and exception handling when facing complex programming tasks, impacting development efficiency.

After

Mastering core Java programming, including syntax, object-oriented programming, collections, streams, and exception handling, enables efficient construction of robust and scalable backend applications.

description SKILL.md


name: java-fundamentals description: Master core Java programming - syntax, OOP, collections, streams, and exception handling sasmp_version: "1.3.0" version: "3.0.0" bonded_agent: 01-java-fundamentals bond_type: PRIMARY_BOND allowed-tools: Read, Write, Bash, Glob, Grep

Parameter Validation

parameters: java_version: type: string default: "21" enum: ["8", "11", "17", "21"] topic: type: string enum: [syntax, oop, collections, streams, exceptions, generics]

Java Fundamentals Skill

Master core Java programming with production-quality patterns.

Overview

This skill covers Java fundamentals including syntax, OOP, collections, streams API, and exception handling for Java 8-21.

When to Use This Skill

Use when you need to:

  • Write clean, idiomatic Java code
  • Design classes following OOP principles
  • Choose appropriate collection types
  • Implement functional programming patterns
  • Handle exceptions properly

Topics Covered

Core Syntax (Java 8-21)

  • Variables, data types, operators
  • Control flow, methods, classes
  • Records (Java 16+), sealed classes (Java 17+)
  • Pattern matching (Java 21)

Object-Oriented Programming

  • Classes, inheritance, polymorphism
  • Interfaces and abstract classes
  • SOLID principles

Collections Framework

  • List: ArrayList, LinkedList
  • Set: HashSet, TreeSet
  • Map: HashMap, ConcurrentHashMap
  • Queue: ArrayDeque, PriorityQueue

Streams API

  • filter, map, flatMap, reduce, collect
  • Optional handling
  • Parallel streams

Exception Handling

  • Checked vs unchecked exceptions
  • Try-with-resources
  • Custom exceptions

Quick Reference

// Record (Java 16+)
public record User(String name, String email) {}

// Pattern matching (Java 21)
String format(Object obj) {
    return switch (obj) {
        case Integer i -> "Int: %d".formatted(i);
        case String s -> "String: %s".formatted(s);
        default -> obj.toString();
    };
}

// Stream operations
List<String> names = users.stream()
    .filter(User::isActive)
    .map(User::getName)
    .sorted()
    .toList();

// Optional handling
String name = Optional.ofNullable(user)
    .map(User::getName)
    .orElse("Unknown");

Collection Selection

NeedUseReason
Indexed accessArrayListO(1) random access
Unique elementsHashSetO(1) contains
Sorted uniqueTreeSetO(log n) sorted
Key-value pairsHashMapO(1) get/put

Troubleshooting

ProblemCauseSolution
NullPointerExceptionNull referenceUse Optional
ConcurrentModificationExceptionModify during iterationIterator.remove()
ClassCastExceptionWrong typeUse generics

Usage

Skill("java-fundamentals")

forumUser Reviews (0)

Write a Review

Effect
Usability
Docs
Compatibility

No reviews yet

Statistics

Installs2.1K
Rating4.8 / 5.0
Version
Updated2026年3月17日
Comparisons1

User Rating

4.8(91)
5
0%
4
0%
3
0%
2
0%
1
0%

Rate this Skill

0.0

Compatible Platforms

🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI

Timeline

Created2026年3月17日
Last Updated2026年3月17日