with one click
java-fundamentals
Master core Java programming - syntax, OOP, collections, streams, and exception handling
Menu
Master core Java programming - syntax, OOP, collections, streams, and exception handling
| 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 |
| parameters | {"java_version":{"type":"string","default":"21","enum":["8","11","17","21"]},"topic":{"type":"string","enum":["syntax","oop","collections","streams","exceptions","generics"]}} |
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")
Master Java concurrency - threads, executors, locks, CompletableFuture, virtual threads
Containerize Java applications - Dockerfile optimization, JVM settings, security
Master Gradle - Kotlin DSL, task configuration, build optimization, caching
Master JPA/Hibernate - entity design, queries, transactions, performance optimization
Master Maven and Gradle - build configuration, dependencies, plugins, CI/CD
Master Apache Maven - POM configuration, plugins, lifecycle, dependency management