YouTube2Text

Now is the best time to learn Java — Transcript

by Awesome · 1,472 words · 243 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Really big news for the lucky few of us
  2. 0:02who are still employed as software
  3. 0:03developers in 2026. Java 27 was just
  4. 0:07released and this is a really big one.
  5. 0:09It comes with nine JDK enhancement
  6. 0:11proposals including major runtime
  7. 0:13improvements, postquantum security,
  8. 0:15better pattern matching, and another
  9. 0:17collection of preview features that may
  10. 0:19eventually become permanent sometimes in
  11. 0:21the 2030s. And what's really exciting is
  12. 0:24that the most important change is one
  13. 0:26that requires absolutely no changes to
  14. 0:27your code. Compact object headers are
  15. 0:30now enabled by default. For context, on
  16. 0:32a 64-bit JVM, every Java object needs a
  17. 0:35header containing internal information
  18. 0:37such as its class and synchronization
  19. 0:39state. And Java 27 reduces this header
  20. 0:42from 96 bits to 64 bits or from 12 bytes
  21. 0:45to 8 bytes. Sure, four bytes might sound
  22. 0:47irrelevant, but that's because you are
  23. 0:49not familiar with the monstrosity of
  24. 0:50object-oriented programming in Java.
  25. 0:52It's safe to assume that a large Java
  26. 0:54application can create millions of
  27. 0:56objects all through thoughtfully
  28. 0:58engineered factories, abstract
  29. 0:59factories, and factories of factories.
  30. 1:02So, smaller headers can reduce heap
  31. 1:03usage, improve cache locality, and allow
  32. 1:06more application instances to run on the
  33. 1:08same hardware. Of course, the exact
  34. 1:10savings depend on the objects and their
  35. 1:11alignment, so you won't save too much on
  36. 1:13your AWS bill, but for applications
  37. 1:16containing huge numbers of small
  38. 1:17objects, the memory consumption can
  39. 1:19decrease to up to 20%. And that's great
  40. 1:22news because you'll need that money for
  41. 1:24all your future AI token consumption.
  42. 1:26The second automatic improvement
  43. 1:28concerns garbage collection and G1 is
  44. 1:30now the default garbage collector in
  45. 1:32every environment. It's important to
  46. 1:34note that G1 has already been the
  47. 1:36default on server class machines for
  48. 1:38years, but smaller environments could
  49. 1:40still fall back to the serial collector.
  50. 1:42From Java 27 onward, if you don't
  51. 1:44explicitly choose a garbage collector,
  52. 1:46the JVM will always use G1. This gives
  53. 1:49Java more consistent behavior across
  54. 1:51developer machines, containers, and
  55. 1:53production servers. Also note that the
  56. 1:55Java team also worked to ensure that
  57. 1:57workloads previously using serial don't
  58. 1:59suffer significant regressions in
  59. 2:01startup time, memory consumption,
  60. 2:03throughput, or latency. So if you can
  61. 2:05upgrade to Java 27 today, and let's be
  62. 2:08honest, the reality is that you'll never
  63. 2:10be able to do that on your legacy
  64. 2:11production project. Two of the biggest
  65. 2:13changes improve memory usage and garbage
  66. 2:15collection without developers touching a
  67. 2:17single line of application code. The
  68. 2:19language itself also becomes more
  69. 2:21consistent through primitive types in
  70. 2:23patterns, instance of and switch. Java
  71. 2:26is famously late to the game when it
  72. 2:27comes to pattern matching, and this
  73. 2:29feature has traditionally worked mainly
  74. 2:31with reference types. Java 27 continues
  75. 2:34the work of allowing primitive values
  76. 2:35such as int, long, and double to
  77. 2:37participate in the same constructs. And
  78. 2:40if this sounds exciting, there is only
  79. 2:41one small detail to keep in mind. This
  80. 2:44is the fifth preview of the feature. So,
  81. 2:46we've been previewing this feature for
  82. 2:47the past 2 years, but we shouldn't get
  83. 2:49too emotionally attached to it yet.
  84. 2:51Structured concurrency is back as well.
  85. 2:53This time in its seventh preview. If you
  86. 2:55are following my channel, you probably
  87. 2:57know that I'm a big fan of Java
  88. 2:58concurrency, mostly because I love
  89. 3:00complexity for the sake of complexity.
  90. 3:02This is what helps with job security and
  91. 3:05I usually rely on intricate difficult to
  92. 3:07follow concurrency abstractions to make
  93. 3:09sure nobody can replace me at my current
  94. 3:11job. [music] And trust me, this is
  95. 3:13really valuable in the current job
  96. 3:14market. Jokes aside, structured
  97. 3:16concurrency is extremely useful. If one
  98. 3:19request launches several related tasks,
  99. 3:21Java can treat those tasks as one unit
  100. 3:23of work. Their lifetime remains
  101. 3:25connected to the surrounding operation.
  102. 3:27Failures can cancel sibling tasks and
  103. 3:29observability tools can understand that
  104. 3:31the threads belong together. This works
  105. 3:33especially well with virtual threads
  106. 3:35because instead of manually coordinating
  107. 3:37futures, cancellation and error
  108. 3:39propagation, the structure of the code
  109. 3:41represents the structure of the
  110. 3:42concurrent operation. The API has
  111. 3:45changed repeatedly while being
  112. 3:46previewed, which is the entire purpose
  113. 3:48of previews. But seven rounds also tell
  114. 3:50us that the Java team is taking its time
  115. 3:52before freezing an API that could
  116. 3:53influence concurrent Java code for the
  117. 3:55next 20 years. Java 27 also introduces
  118. 3:58postquantum hybrid key exchange for TLS
  119. 4:011.3. I was mentioning in a previous
  120. 4:03video that Cloudflare recently
  121. 4:05accelerated its postquantum road map and
  122. 4:07now wants its entire infrastructure
  123. 4:09including authentication to be quantum
  124. 4:11safe by 2029. The reason is that recent
  125. 4:14advances in quantum hardware, error
  126. 4:16correction, and algorithms have moved
  127. 4:18the estimated arrival of
  128. 4:20cryptographically relevant quantum
  129. 4:21computers much closer. And if AI models
  130. 4:24and the bad economy haven't given you
  131. 4:26enough reasons to worry, according to
  132. 4:28Cloudflare, the industry's usual
  133. 4:30timeline of 2035 or later may no longer
  134. 4:32be realistic. And Google is apparently
  135. 4:35concerned that the so-called Qday could
  136. 4:37arrive as early as 2030. But the biggest
  137. 4:39problem is that encrypted traffic
  138. 4:41capture today could theoretically be
  139. 4:43stored and decrypted later once
  140. 4:45sufficiently capable quantum computers
  141. 4:47exist. Java now combines a traditional
  142. 4:49key exchange algorithm with a quantum
  143. 4:51resistant one. So an attacker would need
  144. 4:53to break both mechanisms. [music] The
  145. 4:55new PM encoding API also returns for its
  146. 4:58third preview. Java can now encode and
  147. 5:00decode cryptographic keys, certificates,
  148. 5:02and certificate revocation lists using
  149. 5:05the common PM format through a standard
  150. 5:07API. Lazy constants are also back for
  151. 5:09their third preview as well. They allow
  152. 5:11an immutable value to be initialized
  153. 5:13only when it is first required while
  154. 5:15still being treated as a constant by the
  155. 5:17JVM. This is useful when initialization
  156. 5:19is expensive or when a value may never
  157. 5:22be needed during a particular execution.
  158. 5:24As a result, it can reduce startup work
  159. 5:26without forcing developers to implement
  160. 5:28their own delicate lazy initialization
  161. 5:30logic with volatile fields and
  162. 5:32synchronization. The Vector API reaches
  163. 5:34its 12th incubator release because
  164. 5:36apparently structured concurrency looked
  165. 5:38far too decisive. It lets developers
  166. 5:41express vector computations that the JVM
  167. 5:43can compile into SIMD instructions
  168. 5:46supported by the processor. This is
  169. 5:48useful when working with numerical
  170. 5:49processing, analytics, cryptography, and
  171. 5:52machine learning inference where one CPU
  172. 5:54instruction can operate on multiple
  173. 5:56values at once. And to be fair, it
  174. 5:58remains an incubator API because the
  175. 6:01design still depends on both JVM
  176. 6:03development and the evolution of modern
  177. 6:05CPU architectures. Finally, Java Flight
  178. 6:08Recorder can now redact sensitive data
  179. 6:10before it leaves the running process.
  180. 6:12Command line arguments, environment
  181. 6:14variables, and system properties can
  182. 6:16contain passwords, tokens, and database
  183. 6:18credentials, all of which could
  184. 6:19accidentally end up inside a diagnostic
  185. 6:22recording. Java 27 allows these values
  186. 6:24to be removed at the source which is
  187. 6:26much safer than attempting to sanitize
  188. 6:28the recording after it has already been
  189. 6:30written or uploaded to another system.
  190. 6:32But before wrapping things up, Cotlin
  191. 6:34had news in September as well. Cotlin
  192. 6:372.5 beta is out and a few language
  193. 6:39changes stand out. If you like Java, you
  194. 6:41probably love Cotlin and as you know
  195. 6:43their updates are much more developer
  196. 6:45friendly. So first namebased
  197. 6:47destructuring is now stable with the new
  198. 6:49syntax. Cutlin takes values from
  199. 6:51properties by name while the familiar
  200. 6:53valy syntax still takes them by
  201. 6:55position. That makes the new form useful
  202. 6:57when you care about which property
  203. 6:58you're reading rather than trusting that
  204. 7:00you remembered its position correctly.
  205. 7:02Second, Cutlin is experimenting with
  206. 7:04companion extensions and companion
  207. 7:06blocks. These let you add something
  208. 7:07callable through a type's name without
  209. 7:09first creating a companion object. On
  210. 7:11the JVM, declarations in a companion
  211. 7:14block can become static members without
  212. 7:16a JVM static. So, Cotlin has found
  213. 7:18another way to make Java
  214. 7:19interoperability slightly less
  215. 7:21ceremonial. Keep in mind that this
  216. 7:23feature still needs a compiler flag.
  217. 7:25Cotlin also adds three experimental
  218. 7:27functions for boolean values. The first
  219. 7:29two run a block when a condition has the
  220. 7:31matching value, then return the original
  221. 7:33boolean. So, you can write tags at
  222. 7:35Cotlin on true print line tag added and
  223. 7:37still keep the result of add. Meanwhile,
  224. 7:40if or null runs a block when the
  225. 7:41condition is true and returns null
  226. 7:43otherwise, compile time constants have
  227. 7:45also graduated to stable. So, the
  228. 7:47compiler can evaluate more expressions
  229. 7:49ahead of time, including supported
  230. 7:51string operations and unsigned
  231. 7:53arithmetic. Granted, this is a fairly
  232. 7:55modest change compared with the JVM
  233. 7:57updates we just covered, but useful when
  234. 7:59a value really does need to be a
  235. 8:01constant and you'd rather calculate it
  236. 8:03in Cotlin than paste the result into
  237. 8:05your code. We'll go old school today and
  238. 8:07The Wire is your awesome TV show
  239. 8:09recommendation, which in my opinion is
  240. 8:11one of the best TV series ever created.
  241. 8:14Please don't forget to like and
  242. 8:15subscribe because it helps a lot. And
  243. 8:17until next time, thank you for watching.

About this transcript

This page contains the full transcript of Now is the best time to learn Java by Awesome, generated from the public captions YouTube serves with the video. The transcript has 1,472 words across 243 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.