java-fundamentals by pluginagentmarketplace/custom-plugin-java
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-java --skill java-fundamentals掌握核心 Java 编程及生产级代码模式。
本技能涵盖 Java 基础,包括 Java 8-21 的语法、面向对象编程、集合、流 API 和异常处理。
当您需要时使用此技能:
// 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");
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 需求 | 使用 | 原因 |
|---|---|---|
| 索引访问 | ArrayList | O(1) 随机访问 |
| 唯一元素 | HashSet | O(1) 包含检查 |
| 排序唯一 | TreeSet | O(log n) 排序 |
| 键值对 | HashMap | O(1) 获取/存放 |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| NullPointerException | 空引用 | 使用 Optional |
| ConcurrentModificationException | 迭代时修改 | Iterator.remove() |
| ClassCastException | 类型错误 | 使用泛型 |
Skill("java-fundamentals")
每周安装量
229
代码仓库
GitHub 星标数
27
首次出现
2026年1月21日
安全审计
安装于
opencode206
gemini-cli192
codex191
github-copilot178
amp163
kimi-cli159
Master core Java programming with production-quality patterns.
This skill covers Java fundamentals including syntax, OOP, collections, streams API, and exception handling for Java 8-21.
Use when you need to:
// 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");
| Need | Use | Reason |
|---|---|---|
| Indexed access | ArrayList | O(1) random access |
| Unique elements | HashSet | O(1) contains |
| Sorted unique | TreeSet | O(log n) sorted |
| Key-value pairs | HashMap | O(1) get/put |
| Problem | Cause | Solution |
|---|---|---|
| NullPointerException | Null reference | Use Optional |
| ConcurrentModificationException | Modify during iteration | Iterator.remove() |
| ClassCastException | Wrong type | Use generics |
Skill("java-fundamentals")
Weekly Installs
229
Repository
GitHub Stars
27
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode206
gemini-cli192
codex191
github-copilot178
amp163
kimi-cli159
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
107,800 周安装
Cloudflare D1 数据库使用指南 - 快速上手教程与最新功能更新
408 周安装
Amazon Working Backwards 方法指南:5个问题与PR-FAQ流程详解,提升产品开发效率
421 周安装
CI/CD流水线专家指南:GitHub Actions、GitLab CI、Jenkins安全高效部署
442 周安装
文件整理器 - 自动整理电脑文件,清理重复项,优化文件夹结构
451 周安装
LobeHub Modal命令式API指南:React模态框实现与最佳实践
459 周安装
Ansible自动化指南:配置管理、应用部署与多服务器编排最佳实践
454 周安装