legacy
12 tutorials tagged “legacy”.
- HttpURLConnection in JavaThe legacy HTTP client: request methods, status codes, sending a POST body, reading error responses, and how it compares with HttpClient.
- File Class in JavaThe legacy java.io.File class represents files and folders. Learn its constructors and methods, its silent-failure pitfalls, and converting to Path with toPath.
- Hashtable in JavaHashtable is a legacy, synchronized hash table map that allows no null keys or values. Learn its methods, how it differs, and what replaced it.
- Stack Class in JavaThe Stack class is a last-in, first-out collection with push, pop, peek and search. Learn its methods, examples, and why ArrayDeque is preferred.
- Vector in JavaVector is a legacy, synchronized resizable array that implements List. Learn its methods, how it grows, and why ArrayList replaced it.
- Date and Calendar Classes in JavaThe legacy java.util.Date and Calendar classes: how they work, why they are confusing and error-prone, and why java.time replaced them in Java 8.
- Converting Between Legacy and New Date ClassesConvert Date, Calendar, java.sql dates and TimeZone to and from Instant, LocalDate, ZonedDateTime and ZoneId with the bridge methods added in Java 8.
- ThreadGroup in JavaThreadGroup is a legacy way to organize threads into groups. Learn what it does, its few remaining uses, and why executors replaced it.
- Timer and TimerTask in JavaTimer runs TimerTask jobs once or repeatedly on a background thread. Learn schedule, scheduleAtFixedRate and cancel, and what replaced them.
- URLConnection Class in JavaURLConnection is the classic way to read a resource from a URL: openConnection, request properties, response headers, timeouts and reading the body.