首页/AI 后端工程/java-fundamentals
J

java-fundamentals

by @pluginagentmarketplacev
4.2(83)

掌握Java编程语言的核心基础,包括语法、面向对象编程、集合框架和流操作,为构建健壮的后端应用打下坚实基础。

javaobject-oriented-programming-(oop)jvmspring-frameworkbackend-developmentGitHub
安装方式
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-java --skill java-fundamentals
compare_arrows

Before / After 效果对比

1
使用前

缺乏扎实的Java基础知识,在面对复杂编程任务时,难以高效运用面向对象、集合、流和异常处理等特性,影响开发效率。

使用后

掌握核心Java编程,包括语法、面向对象、集合、流和异常处理,能够高效构建健壮、可扩展的后端应用。

SKILL.md

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")

用户评价 (0)

发表评价

效果
易用性
文档
兼容性

暂无评价

统计数据

安装量526
评分4.2 / 5.0
版本
更新日期2026年7月4日
对比案例1 组

用户评分

4.2(83)
5
77%
4
23%
3
0%
2
0%
1
0%

为此 Skill 评分

0.0

兼容平台

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

时间线

创建2026年3月17日
最后更新2026年7月4日
🎁 Agent 知识卡片
调研问卷