🧰 Core APIs Toolbox
12 Java concepts, each explained step by step with real code, a common trap and practice questions.
- BigDecimal for moneyExact decimal math, new BigDecimal("0.1") vs (0.1), compareTo vs equals, scale and RoundingMode.
- BigIntegerArbitrary-precision integers.
- java.time: LocalDate & LocalDateTimeImmutable date/time without zone; plusDays returns a new object.
- Instant, ZonedDateTime & time zonesMachine time vs human time, ZoneId, DST.
- Duration vs PeriodTime-based vs date-based amounts.
- Formatting & parsing datesDateTimeFormatter patterns; legacy Date/Calendar/SimpleDateFormat problems.
- Regular expressionsPattern, Matcher, groups, matches vs find, common regex pitfalls.
- The Objects classequals, hash, requireNonNull, toString with default, isNull.
- Random numbersRandom, ThreadLocalRandom, SecureRandom, RandomGenerator.
- System & RuntimecurrentTimeMillis vs nanoTime, getenv, properties, exit codes.
- UUID & hashing basicsUUID.randomUUID, MessageDigest for checksums.
- Locale & internationalizationLocale-sensitive formatting, toUpperCase(Locale.ROOT), NumberFormat, ResourceBundle.