java-fundamentals

pluginagentmarketplace/custom-plugin-java · updated Apr 8, 2026

$npx skills add https://github.com/pluginagentmarketplace/custom-plugin-java --skill java-fundamentals
0 commentsdiscussion
summary

Master core Java programming with production-quality patterns.

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

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

Troubleshooting

Problem Cause Solution
NullPointerException Null reference Use Optional
ConcurrentModificationException Modify during iteration Iterator.remove()
ClassCastException Wrong type Use generics

Usage

Skill("java-fundamentals")

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.666 reviews
  • Maya Rahman· Dec 28, 2024

    Solid pick for teams standardizing on skills: java-fundamentals is focused, and the summary matches what you get after install.

  • Kiara Lopez· Dec 28, 2024

    Useful defaults in java-fundamentals — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Kaira Smith· Dec 16, 2024

    We added java-fundamentals from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Kabir Ndlovu· Dec 12, 2024

    java-fundamentals fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Pratham Ware· Dec 4, 2024

    Useful defaults in java-fundamentals — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Evelyn Sharma· Nov 27, 2024

    java-fundamentals reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Yash Thakker· Nov 23, 2024

    java-fundamentals is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Zaid Ramirez· Nov 23, 2024

    Registry listing for java-fundamentals matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Maya Martinez· Nov 19, 2024

    We added java-fundamentals from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Aarav Choi· Nov 19, 2024

    java-fundamentals is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

showing 1-10 of 66

1 / 7