World 17 of 26 · Intermediate

🧰 Core APIs Toolbox

12 Java concepts, each explained step by step with real code, a common trap and practice questions.

  1. BigDecimal for moneyExact decimal math, new BigDecimal("0.1") vs (0.1), compareTo vs equals, scale and RoundingMode.
  2. BigIntegerArbitrary-precision integers.
  3. java.time: LocalDate & LocalDateTimeImmutable date/time without zone; plusDays returns a new object.
  4. Instant, ZonedDateTime & time zonesMachine time vs human time, ZoneId, DST.
  5. Duration vs PeriodTime-based vs date-based amounts.
  6. Formatting & parsing datesDateTimeFormatter patterns; legacy Date/Calendar/SimpleDateFormat problems.
  7. Regular expressionsPattern, Matcher, groups, matches vs find, common regex pitfalls.
  8. The Objects classequals, hash, requireNonNull, toString with default, isNull.
  9. Random numbersRandom, ThreadLocalRandom, SecureRandom, RandomGenerator.
  10. System & RuntimecurrentTimeMillis vs nanoTime, getenv, properties, exit codes.
  11. UUID & hashing basicsUUID.randomUUID, MessageDigest for checksums.
  12. Locale & internationalizationLocale-sensitive formatting, toUpperCase(Locale.ROOT), NumberFormat, ResourceBundle.