Skip to main content

Matrix Programs in Java: Addition, Multiplication, Transpose, Spiral and Rotation

The five classic Java matrix programs on a plain int[][]: addition, multiplication, transpose, spiral order and 90-degree rotation, each with a diagram, a dry run and real JDK 25 output, plus six mistakes that lose marks (an unchanged transpose, a spiral that repeats numbers, a silent int overflow) and operation counts for the complexity question.

JWT Refresh Token Rotation in Spring Security 7 (With Reuse Detection)

Build refresh token rotation with token families and reuse detection on Spring Boot 4.1 and Spring Security 7.1. Opaque hashed tokens, a race-proof conditional UPDATE, a grace window, logout everywhere, and the access token that outlives logout, all run and captured.