Sorry

This feed does not validate.

In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

Source: http://blog.jetbrains.com/idea/feed/

  1. <?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
  2. xmlns:content="http://purl.org/rss/1.0/modules/content/"
  3. xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  4. xmlns:dc="http://purl.org/dc/elements/1.1/"
  5. xmlns:atom="http://www.w3.org/2005/Atom"
  6. xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  7. xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  8. xmlns:media="http://search.yahoo.com/mrss/" >
  9.  
  10. <channel>
  11. <title>The IntelliJ IDEA Blog : IntelliJ IDEA – the Leading Java and Kotlin IDE, by JetBrains | The JetBrains Blog</title>
  12. <atom:link href="https://blog.jetbrains.com/idea/feed/" rel="self" type="application/rss+xml" />
  13. <link>https://blog.jetbrains.com</link>
  14. <description>Developer Tools for Professionals and Teams</description>
  15. <lastBuildDate>Wed, 17 Apr 2024 11:27:21 +0000</lastBuildDate>
  16. <language>en-US</language>
  17. <sy:updatePeriod>
  18. hourly </sy:updatePeriod>
  19. <sy:updateFrequency>
  20. 1 </sy:updateFrequency>
  21.  
  22. <image>
  23. <url>https://blog.jetbrains.com/wp-content/uploads/2024/01/cropped-mstile-310x310-1-32x32.png</url>
  24. <title>The IntelliJ IDEA Blog : IntelliJ IDEA – the Leading Java and Kotlin IDE, by JetBrains | The JetBrains Blog</title>
  25. <link>https://blog.jetbrains.com</link>
  26. <width>32</width>
  27. <height>32</height>
  28. </image>
  29. <item>
  30. <title>Easy Hacks: How to Handle Exceptions in Java</title>
  31. <link>https://blog.jetbrains.com/idea/2024/04/easy-hacks-how-to-handle-exceptions-in-java/</link>
  32. <dc:creator><![CDATA[Maarten Balliauw]]></dc:creator>
  33. <pubDate>Wed, 17 Apr 2024 11:27:15 +0000</pubDate>
  34. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2024/04/ij-release-featured_blog_1280x720-1.png</featuredImage> <category><![CDATA[idea]]></category>
  35. <category><![CDATA[java]]></category>
  36. <category><![CDATA[exception]]></category>
  37. <category><![CDATA[intellij-idea]]></category>
  38. <category><![CDATA[learn]]></category>
  39. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=465137</guid>
  40.  
  41. <description><![CDATA[Previously, we explored how to throw exceptions in Java to signal error conditions in our code. But throwing exceptions is only half the story. To build robust and reliable applications, we also need to know how to handle them effectively. In this post, we’ll explore how you can handle exceptions in Java, and we’ll also [&#8230;]]]></description>
  42. <content:encoded><![CDATA[
  43. <p>Previously, we explored <a href="https://blog.jetbrains.com/idea/2024/03/easy-hacks-how-to-throw-java-exceptions/">how to throw exceptions in Java</a> to signal error conditions in our code. But throwing exceptions is only half the story. To build robust and reliable applications, we also need to know how to handle them effectively.</p>
  44.  
  45.  
  46.  
  47. <p>In this post, we’ll explore how you can handle exceptions in Java, and we’ll also show you some techniques to manage expected and unexpected events in your projects.</p>
  48.  
  49.  
  50.  
  51. <h2 class="wp-block-heading">Understanding exceptions</h2>
  52.  
  53.  
  54.  
  55. <p>Exceptions are objects that represent errors or unexpected events that occur during program execution. When an exception is thrown, the normal flow of control is interrupted, and the program transfers control to an appropriate exception handler.</p>
  56.  
  57.  
  58.  
  59. <p>Java defines three main categories of exceptions:</p>
  60.  
  61.  
  62.  
  63. <ul>
  64. <li><strong>Checked exceptions</strong> – These are exceptions that the compiler requires you to handle explicitly. They typically represent recoverable errors, such as files not being found (<code>FileNotFoundException</code> or <code>IOException</code>), network connection issues, or business logic errors that you will want to recover from.</li>
  65.  
  66.  
  67.  
  68. <li><strong>Unchecked exceptions</strong> – These exceptions, also known as runtime exceptions, don&#8217;t require explicit handling. They often represent programming errors, such as attempting to access a null object (<code>NullPointerException</code>), or an invalid array index (<code>ArrayIndexOutOfBoundsException</code>).</li>
  69.  
  70.  
  71.  
  72. <li><strong>Errors</strong> – These exceptions are typically used by the JVM, like <code>OutOfMemoryError</code>, and indicate severe problems like the JVM being unable to allocate memory for an object. Recovery from such situations is generally not possible.&nbsp;</li>
  73. </ul>
  74.  
  75.  
  76.  
  77. <p>The Java platform provides a rich library of exception classes to signal errors in your code. Additionally, you can create custom exception types to indicate interruptions in the normal application flow.</p>
  78.  
  79.  
  80.  
  81. <p>Methods in code that can throw checked exceptions must be annotated with the <code>throws</code> syntax to make information available to the caller. Either by adding <code>throws</code> to their own method signature (signifying the caller could also throw checked exceptions), or <code>catch</code> the exception and handle it. You could also re-throw the exception, as we will see later. What’s more, tools like IntelliJ IDEA can analyze whether exceptions are handled (or not), and suggest a proper resolution.</p>
  82.  
  83.  
  84.  
  85. <figure class="wp-block-image size-full"><img decoding="async" fetchpriority="high" width="1600" height="864" src="https://blog.jetbrains.com/wp-content/uploads/2024/04/image-11.png" alt="" class="wp-image-465160"/></figure>
  86.  
  87.  
  88.                    <div class="alert ">
  89.            <p><strong>Note:</strong> Make sure to read <a href="https://blog.jetbrains.com/idea/2024/03/easy-hacks-how-to-throw-java-exceptions/">How to Throw Java Exceptions</a> to get a better understanding of the topic.</p>
  90.        </div>
  91.    
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98. <h2 class="wp-block-heading">Handling exceptions with <code>try...catch</code> blocks</h2>
  99.  
  100.  
  101.  
  102. <p>The <code>try...catch</code> block is the primary mechanism for handling Java exceptions. Code that might throw an exception is placed within the <code>try</code> block, and the <code>catch</code> block handles the exception or its inheritors as appropriate.</p>
  103.  
  104.  
  105.  
  106. <p>Here&#8217;s the basic syntax:</p>
  107.  
  108.  
  109.  
  110. <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="wpcustom" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">try {
  111.  // Code that might throw an exception
  112. } catch (SomeException e) {
  113.  // Handle the exception of type SomeException and its inheritors
  114. }</pre>
  115.  
  116.  
  117.  
  118. <p>For example, the following code attempts to read data from a file and catches a potential <code>FileNotFoundException</code>:</p>
  119.  
  120.  
  121.  
  122. <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="wpcustom" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">try {
  123.  FileReader reader = new FileReader("data.txt");
  124.  // Read data from the file
  125. } catch (FileNotFoundException e) {
  126.  System.out.println("Error: File not found!");
  127. }</pre>
  128.  
  129.  
  130.                    <div class="alert ">
  131.            <p><strong>Note:</strong> In IntelliJ IDEA, use the <em>Surround With…</em> action (<kbd>Ctrl+Alt+T</kbd> on Windows/Linux, <kbd>⌘⌥T</kbd> on macOS) or use the <em>Surround</em> tab in the floating toolbar to quickly add a <code>try...catch</code> or <code>try...catch...finally</code> block around selected code:<br/><br />
  132. <img decoding="async" width="1600" height="380" src="https://blog.jetbrains.com/wp-content/uploads/2024/04/image-12.png" alt="" class="wp-image-465171"/></p>
  133.        </div>
  134.    
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141. <p>You can have multiple <code>catch</code> blocks to handle different types of exceptions:</p>
  142.  
  143.  
  144.  
  145. <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="wpcustom" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">try {
  146.  // Code that might throw different exceptions
  147. } catch (FileNotFoundException e) {
  148.  // Handle file not found exception
  149. } catch (IOException e) {
  150.  // Handle other I/O exceptions
  151. }</pre>
  152.  
  153.  
  154.  
  155. <p>The <code>finally</code> block is an optional part of the <code>try...catch</code> construct. It executes regardless of whether an exception is thrown, unless it’s an exception that terminates the JVM, such as the one thrown after invoking <code>System.exit()</code>. The <code>finally</code> block is ideal for cleanup tasks like closing files, streams, database connections, or releasing other resources. Note that <code>try...finally</code> is also possible, without <code>catch</code>.</p>
  156.  
  157.  
  158.  
  159. <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="wpcustom" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">try {
  160.  // Open a file and process data
  161. } catch (IOException e) {
  162.  // Handle exception
  163. } finally {
  164.  // Close the file
  165. }</pre>
  166.  
  167.  
  168.  
  169. <p>While the <code>try...catch...finally</code> construct provides a robust mechanism for handling exceptions and ensuring resource cleanup, a more concise and streamlined approach exists: <code>try...with...resources</code>. Let&#8217;s see how it works!</p>
  170.  
  171.  
  172.  
  173. <h2 class="wp-block-heading">Resource cleanup with <code>try...with...resources</code></h2>
  174.  
  175.  
  176.  
  177. <p>Java 7 introduced the <code>try...with...resources</code> construct, simplifying exception handling when working with resources that need to be closed. Files, streams, database connections, and other closable resources will be closed automatically, even if an exception occurs, eliminating the need for explicit cleanup in a <code>finally</code> block.</p>
  178.  
  179.  
  180.  
  181. <p>Any object that implements <code>java.lang.AutoCloseable</code>, which includes all objects that implement <code>java.io.Closeable</code>, can be used as a resource.</p>
  182.  
  183.  
  184.  
  185. <p>Here&#8217;s the syntax for <code>try...with...resources</code>:</p>
  186.  
  187.  
  188.  
  189. <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="wpcustom" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">try (Resource resource = ...) {
  190.  // Code that uses the resource
  191. } catch (ExceptionType e) {
  192.  // Handle exception
  193. }</pre>
  194.  
  195.  
  196.  
  197. <p>The following example reads the first line from a file. It uses an instance of <code>FileReader</code> and <code>BufferedReader</code> to read data from the file. <code>FileReader</code> is a resource that must be closed after the program is finished using it in order to prevent resource leaks and allow other programs to access the file:</p>
  198.  
  199.  
  200.  
  201. <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="wpcustom" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">try (BufferedReader reader = new BufferedReader(new FileReader("data.txt"))) {
  202.  String line;
  203.  while ((line = reader.readLine()) != null) {
  204.    // Process the line
  205.  }
  206. } catch (IOException e) {
  207.  System.out.println("Error reading file: " + e.getMessage());
  208. }</pre>
  209.  
  210.  
  211.  
  212. <p>In this example, the <code>FileReader</code> used by the <code>BufferedReader</code> resource is automatically closed when the <code>try</code> block finishes, regardless of whether an exception occurs or not. This eliminates the need for a <code>finally</code> block to explicitly close the reader.&nbsp;</p>
  213.  
  214.  
  215.  
  216. <p>In IntelliJ IDEA, use the <em>Fix Anything</em> action (<kbd>Alt+Enter</kbd><em> </em>on Windows/Linux, <kbd>⌥⏎</kbd> on macOS) after the IDE warns about using a closable resource without <code>try...with...resources</code> to automatically wrap the resource with this construct:</p>
  217.  
  218.  
  219.  
  220. <img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/04/image-13.png" data-gif-src="https://blog.jetbrains.com/wp-content/uploads/2024/04/image-6.gif" />
  221.  
  222.  
  223.  
  224. <p>As a more elaborate example, consider using a JDBC database connection, executing a query on it, and working with the result set. The <code>Connection</code>, <code>PreparedStatement</code>, and <code>ResultSet</code> objects being used all have to be closed in the <code>finally</code> block. Here’s what that code would look like with <code>try...catch...finally</code>:</p>
  225.  
  226.  
  227.  
  228. <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="wpcustom" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Connection conn = null;
  229. PreparedStatement preparedStatement = null;
  230. ResultSet resultSet = null;
  231. try {
  232.    conn = getConnection();
  233.    preparedStatement = prepareStatement(conn);
  234.    resultSet = executeQuery(preparedStatement);
  235.  
  236.    // ...do something with resultSet...
  237.  
  238. } catch (SQLException ex) {
  239.    ex.printStackTrace();
  240. } finally {
  241.    if (resultSet != null) {
  242.        try {
  243.            resultSet.close();
  244.        } catch (SQLException e) {
  245.            e.printStackTrace();
  246.        }
  247.    }
  248.    if (preparedStatement != null) {
  249.        try {
  250.            preparedStatement.close();
  251.        } catch (SQLException e) {
  252.            e.printStackTrace();
  253.        }
  254.    }
  255.    if (conn != null) {
  256.        try {
  257.            conn.close();
  258.        } catch (SQLException e) {
  259.            e.printStackTrace();
  260.        }
  261.    }
  262. }</pre>
  263.  
  264.  
  265.  
  266. <p>Yikes! Here’s some equivalent code with <code>try...with...resources</code>, where the three closable objects are instantiated in the <code>try</code> statement:</p>
  267.  
  268.  
  269.  
  270. <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="wpcustom" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">try (Connection conn = getConnection();
  271.     PreparedStatement preparedStatement = prepareStatement(conn);
  272.     ResultSet resultSet = executeQuery(preparedStatement)) {
  273.  
  274.    // ...do something with resultSet...
  275.  
  276. } catch (SQLException ex) {
  277.    ex.printStackTrace();
  278. }</pre>
  279.  
  280.  
  281.  
  282. <p>Now that’s much more readable! Note that there is a difference between this example and the original code: the <code>try...with...resources</code> version doesn’t catch exceptions from the calls to <code>close()</code> on the resource. If you also need to catch those exceptions, you’ll have to resort to using <code>try...finally</code> and catch the exception when calling <code>close()</code> in the <code>finally</code> block, much like in the original code.</p>
  283.  
  284.  
  285.  
  286. <h2 class="wp-block-heading">Exception propagation</h2>
  287.  
  288.  
  289.  
  290. <p>When an exception is thrown within a method and not caught locally, it is propagated up the call stack to the calling method. This process continues until a matching <code>catch</code> block is found or the exception reaches the top of the call stack, causing the program to terminate. Exception propagation allows for centralized exception handling, where exceptions can be caught and dealt with at a higher level in the application.</p>
  291.  
  292.  
  293.  
  294. <p>Here&#8217;s an example illustrating exception propagation:</p>
  295.  
  296.  
  297.  
  298. <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="wpcustom" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public void main() {
  299.    try {
  300.        methodA();
  301.    } catch (FileNotFoundException e) { // Exception handled here
  302.        System.out.println("File not found exception caught in main method.");
  303.    }
  304. }
  305.  
  306. public void methodA() throws FileNotFoundException {
  307.    methodB(); // Exception not handled here, so it propagates up the stack
  308. }
  309.  
  310. public void methodB() throws FileNotFoundException {
  311.    FileReader reader = new FileReader("nonexistent_file.txt"); // Exception thrown here
  312. }</pre>
  313.  
  314.  
  315.  
  316. <p>In this example, <code>methodB()</code> attempts to open a non-existent file, throwing a <code>FileNotFoundException</code>. Since <code>methodB()</code> doesn&#8217;t handle the exception, it is propagated to <code>methodA()</code>, which also doesn&#8217;t have a <code>catch</code> block. The exception is further propagated to the <code>main</code> method, which catches the exception and prints an error message.</p>
  317.  
  318.  
  319.  
  320. <p>This demonstrates how exceptions can be handled at different call stack levels, allowing for flexible and centralized error management.</p>
  321.  
  322.  
  323.  
  324. <h2 class="wp-block-heading">Re-throwing exceptions</h2>
  325.  
  326.  
  327.  
  328. <p>In some cases, you might want to catch an exception within a method but then re-throw it to be handled further up the call stack. This can be useful in several situations:</p>
  329.  
  330.  
  331.  
  332. <ul>
  333. <li><strong>Performing additional actions before passing the exception</strong> – You might want to log the exception, perform some cleanup, or add additional context before letting another part of the program handle it.</li>
  334.  
  335.  
  336.  
  337. <li><strong>Converting to a more specific exception type</strong> – You might catch a general exception and then re-throw it as a more specific exception type that provides more information about the error.</li>
  338.  
  339.  
  340.  
  341. <li><strong>Hide implementation-specific examples</strong> – Imagine building a framework to store data in different database systems. Instead of surfacing exceptions for specific database engines, your framework may catch all those and throw a common exception type from your framework.</li>
  342. </ul>
  343.  
  344.  
  345.  
  346. <p>Here&#8217;s an example of re-throwing an exception:</p>
  347.  
  348.  
  349.  
  350. <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="wpcustom" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public void processFile(String filename) throws IOException {
  351.    try {
  352.        FileReader reader = new FileReader(filename);
  353.        // Process the file content
  354.    } catch (FileNotFoundException e) {
  355.        System.out.println("File not found: " + filename);
  356.        throw e; // Re-throw the exception after logging
  357.    }
  358. }</pre>
  359.  
  360.  
  361.  
  362. <p>In this example, the <code>processFile()</code> method catches a <code>FileNotFoundException</code> but then re-throws it. This allows the calling method to handle the exception if needed, while still logging the error message within <code>processFile()</code> itself.</p>
  363.  
  364.  
  365.  
  366. <p>When re-throwing exceptions, you can re-throw the same exception object or create a new exception. If you create a new exception, you can include the original exception as the cause so methods up the call stack still have access to the original exception:</p>
  367.  
  368.  
  369.  
  370. <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="wpcustom" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public void processFile(String filename) throws IOException {
  371.    try {
  372.        FileReader reader = new FileReader(filename);
  373.        // Process the file content
  374.    } catch (FileNotFoundException e) {
  375.        System.out.println("File not found: " + filename);
  376.        throw CustomException("Could not process file: not found”, e); // Throw new exception
  377.    }
  378. }</pre>
  379.  
  380.  
  381.  
  382. <h2 class="wp-block-heading">Best practices for exception handling</h2>
  383.  
  384.  
  385.  
  386. <p>When handling exceptions, there are three key best practices. Let’s start with the most important: <strong>Don&#8217;t leave catch blocks empty</strong>. While it’s tempting to write code that is more “fire-and-forget”, and Java requires you to catch checked exceptions, you will lose out on valuable information and cause problems for your application. Don’t do this! <strong>At a minimum, log your exceptions</strong> so you can potentially handle them better based on the information in the logs.</p>
  387.  
  388.  
  389.  
  390. <p>With Java Exception Breakpoints in IntelliJ IDEA, you can have the debugger suspend program execution on any caught/uncaught exception, which may help you identify exceptions handled in an empty <code>catch</code> block. You can enable/disable Java Exception breakpoints for all exceptions or specific exception types using the <em>Run | View Breakpoints</em> menu (<kbd>Ctrl+Shift+F8</kbd> on Windows/Linux, <kbd>⌘⇧F8</kbd> on macOS).</p>
  391.  
  392.  
  393.  
  394. <figure class="wp-block-image size-full"><img decoding="async" width="1600" height="1097" src="https://blog.jetbrains.com/wp-content/uploads/2024/04/image-14.png" alt="" class="wp-image-465207"/></figure>
  395.  
  396.  
  397.  
  398. <p>When debugging, IntelliJ IDEA will suspend your program whenever an exception that matches the breakpoint settings is thrown:</p>
  399.  
  400.  
  401.  
  402. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="1600" height="900" src="https://blog.jetbrains.com/wp-content/uploads/2024/04/image-15.png" alt="" class="wp-image-465219"/></figure>
  403.  
  404.  
  405.  
  406. <p>Another best practice would be to <strong>handle exceptions at the appropriate level</strong>. Catch exceptions at the level in the call stack where you can meaningfully handle them. Don&#8217;t catch exceptions just for the sake of catching them. If you have a utility function to read a file, you can catch <code>IOException</code> directly if it makes sense. However, it might be more meaningful to handle file-related exceptions at a higher level where the caller can decide how to proceed (e.g. retry, or prompt the user to provide a different file).</p>
  407.  
  408.  
  409.  
  410. <p>Lastly, <strong>avoid catching overly broad exceptions</strong>. Be specific about the exceptions you catch. Avoid catching generic exceptions like Exception, as this can mask other potential errors.</p>
  411.  
  412.  
  413.  
  414. <h2 class="wp-block-heading">Conclusion</h2>
  415.  
  416.  
  417.  
  418. <p>In this post, we&#8217;ve explored the essential aspects of exception handling in Java. We learned how to use <code>try...catch</code> blocks to gracefully handle checked and unchecked exceptions, ensuring that our programs don&#8217;t crash unexpectedly. With <code>try...catch...finally</code> and <code>try...with...resources</code>, it’s possible to gracefully close resources like files, streams, database connections, and more. We also looked at exception propagation and re-throwing exceptions.</p>
  419.  
  420.  
  421.  
  422. <p>Remember to ensure there are no empty <code>catch</code> blocks, at the minimum log exceptions, handle exceptions at the appropriate level, and avoid catching overly broad exceptions. With these practices in mind, you can write cleaner, more maintainable, and user-friendly Java code.</p>
  423.  
  424.  
  425.    <div class="buttons">
  426.        <div class="buttons__row">
  427.                                                <a href="https://www.jetbrains.com/idea/" class="btn" target="" rel="noopener">Download IntelliJ IDEA</a>
  428.                                <p>Give it a try in the most loved Java IDE!</p>
  429.                    </div>
  430.    </div>
  431.  
  432.  
  433.  
  434.  
  435. ]]></content:encoded>
  436. </item>
  437. <item>
  438. <title>New Livestream: Java 22 and IntelliJ IDEA</title>
  439. <link>https://blog.jetbrains.com/idea/2024/04/new-livestream-java-22-and-intellij-ideanew-livestream/</link>
  440. <dc:creator><![CDATA[Anna Rovinskaia]]></dc:creator>
  441. <pubDate>Mon, 15 Apr 2024 07:50:42 +0000</pubDate>
  442. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2024/04/Featured_Blog_1280x720-2x-7.png</featuredImage> <category><![CDATA[livestreams]]></category>
  443. <category><![CDATA[intellij-idea]]></category>
  444. <category><![CDATA[webinars]]></category>
  445. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=461395</guid>
  446.  
  447. <description><![CDATA[Join us for a new IntelliJ IDEA Livestream episode with Mala Gupta to explore how IntelliJ IDEA accelerates the adoption of Java 22 features. Date: April 24, 2024 Time: 3:00–4:00 pm UTC REGISTER FOR THE LIVESTREAM Session abstract Get ready to use the new and updated features in Java 22 with IntelliJ IDEA 2024.1. Knowing [&#8230;]]]></description>
  448. <content:encoded><![CDATA[
  449. <p>Join us for a new <a href="https://info.jetbrains.com/idea-livestream-april24-2024.html" target="_blank" rel="noopener">IntelliJ IDEA Livestream episode</a> with Mala Gupta to explore how IntelliJ IDEA accelerates the adoption of Java 22 features.</p>
  450.  
  451.  
  452.  
  453. <p>Date: April 24, 2024</p>
  454.  
  455.  
  456.  
  457. <p>Time: 3:00–4:00 pm UTC</p>
  458.  
  459.  
  460. <p align="center"><a class="jb-download-button" href="https://info.jetbrains.com/idea-livestream-april24-2024.html" target="_blank" rel="noopener">REGISTER FOR THE LIVESTREAM</a></p>
  461.  
  462.  
  463. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="2560" height="1440" src="https://blog.jetbrains.com/wp-content/uploads/2024/04/Featured_Blog_1280x720-2x-7.png" alt="" class="wp-image-465802"/></figure>
  464.  
  465.  
  466.  
  467. <h2 class="wp-block-heading">Session abstract</h2>
  468.  
  469.  
  470.  
  471. <p>Get ready to use the new and updated features in Java 22 with IntelliJ IDEA 2024.1.</p>
  472.  
  473.  
  474.  
  475. <p>Knowing about a feature doesn’t help much when it comes to actually using the feature in your code base. Don’t worry – IntelliJ IDEA has you covered! It detects places in your code where newer Java features can be used. It can then suggest code changes or even replace old code with new code directly – with no need for developers to be aware of the newer features or their syntax.</p>
  476.  
  477.  
  478.  
  479. <p>Join this session, where we’ll give a live coding demonstration and delve into how IntelliJ IDEA accelerates the adoption of Java 22 features such as string templates, implicitly declared classes, instance main methods, statements before super(), unnamed variables and patterns, and more.</p>
  480.  
  481.  
  482.  
  483. <h2 class="wp-block-heading">Asking questions</h2>
  484.  
  485.  
  486.  
  487. <p>Mala will try to answer all of your questions during the session. If we run out of time, we’ll publish the answers to any remaining questions in a follow-up blog post.</p>
  488.  
  489.  
  490.  
  491. <h2 class="wp-block-heading">Your speaker</h2>
  492.  
  493.  
  494.    <div class="about-author ">
  495.        <div class="about-author__box">
  496.            <div class="row">
  497.                                                            <div class="about-author__box-img">
  498.                            <img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2022/11/Mala-Gupta-e1595919910139-edited.jpeg" alt="" loading="lazy">
  499.                        </div>
  500.                                        <div class="about-author__box-text">
  501.                                                    <h4>Mala Gupta</h4>
  502.                                                <p><!-- wp:paragraph --></p>
  503. <p>A Java Champion and JUG leader, <a href="https://twitter.com/eMalaGupta" target="_blank" rel="noopener">Mala</a> has authored multiple books with Manning, Packt, and O’Reilly Publications. She has more than two decades of experience in the software industry and is a regular speaker at industry conferences around the world. She has been actively supporting Java certification as a path to career advancement.</p>
  504. <p><!-- /wp:paragraph --></p>
  505.                    </div>
  506.                            </div>
  507.        </div>
  508.    </div>
  509.  
  510.  
  511.  
  512. <p>Happy developing!</p>
  513. ]]></content:encoded>
  514. </item>
  515. <item>
  516. <title>Java Frameworks You Must Know in 2024</title>
  517. <link>https://blog.jetbrains.com/idea/2024/04/java-frameworks-you-must-know-in-2024/</link>
  518. <dc:creator><![CDATA[Irina Mariasova]]></dc:creator>
  519. <pubDate>Fri, 12 Apr 2024 08:51:25 +0000</pubDate>
  520. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2024/04/ij-release-featured_blog_1280x720.png</featuredImage> <category><![CDATA[idea]]></category>
  521. <category><![CDATA[java]]></category>
  522. <category><![CDATA[intellijidea-2]]></category>
  523. <category><![CDATA[frameworks]]></category>
  524. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=461388</guid>
  525.  
  526. <description><![CDATA[Many developers trust Java worldwide because it is adaptable, secure, and versatile, making it perfect for developing various applications across multiple platforms. It also stands out for its readability and scalability. What are frameworks? Why do you need them? Since Java has a long history, there are plenty of frameworks and libraries to streamline your [&#8230;]]]></description>
  527. <content:encoded><![CDATA[
  528. <p>Many developers trust Java worldwide because it is adaptable, secure, and versatile, making it perfect for developing various applications across multiple platforms. It also stands out for its readability and scalability.</p>
  529.  
  530.  
  531.  
  532. <h2 class="wp-block-heading">What are frameworks? Why do you need them?</h2>
  533.  
  534.  
  535.  
  536. <p>Since Java has a long history, there are plenty of frameworks and libraries to streamline your Java development process.</p>
  537.  
  538.  
  539.  
  540. <p>They provide pre-made chunks of code and a set of rules on how to build your app. This means you don&#8217;t have to start from zero every time you want to create something; you can use these tools to help you along, making it faster and easier to get your app working</p>
  541.  
  542.  
  543.  
  544. <p>In this article, we’ll look at the most popular, efficient, and trending Java frameworks that can help you level up your code.</p>
  545.  
  546.  
  547.  
  548. <h2 class="wp-block-heading">Spring Framework and Spring Boot</h2>
  549.  
  550.  
  551.  
  552. <p>Since the early 2000s, <a href="https://spring.io/" target="_blank" rel="noopener">Spring</a> has evolved alongside Java to provide efficient tools for building Java applications for projects ranging from small-scale web apps to large, complex systems. Spring is not just a framework. It’s an entire ecosystem of supporting frameworks and tools that cover almost all aspects of application development and ensure your application can be developed, tested, and scaled efficiently.</p>
  553.  
  554.  
  555.  
  556. <h3 class="wp-block-heading">Where to Use Spring</h3>
  557.  
  558.  
  559.  
  560. <p>You can use Spring in various areas, including web and enterprise development, microservices, data management, cloud-based applications, big data processing, automation, and testing.</p>
  561.  
  562.  
  563.  
  564. <h3 class="wp-block-heading">Cool Features</h3>
  565.  
  566.  
  567.  
  568. <p>Here is a list of the most powerful capabilities that Spring has to offer</p>
  569.  
  570.  
  571.  
  572. <p><strong>Dependency Injection</strong>. Spring lets you inject dependencies either through constructors or setters, making your code neater and more organized.</p>
  573.  
  574.  
  575.  
  576. <p><strong>Spring MVC</strong>: This is a popular Java framework used for building web applications. It follows the Model-View-Controller (MVC) architectural pattern that separates the application into three main parts: model, view, and controller.</p>
  577.  
  578.  
  579.  
  580. <p><strong>Spring Boot</strong>: This is a sub-project of Spring that allows you to create stand-alone, ready-for-production Spring applications with minimal setup and configuration.</p>
  581.  
  582.  
  583.  
  584. <p><strong>Transaction Management</strong>: Spring gives you a consistent way to manage transactions across different APIs like JTA, JDBC, Hibernate, JPA, and JDO.</p>
  585.  
  586.  
  587.  
  588. <p><strong>Spring Data</strong>: This makes building applications with Spring and data access technologies more efficient.</p>
  589.  
  590.  
  591.  
  592. <p><strong>Spring Security</strong>: A powerful framework that provides strong and customizable security measures for your Spring applications, including authentication and access control.</p>
  593.  
  594.  
  595.  
  596. <p><strong>Testing Support</strong>: Spring offers great tools for unit and integration testing, including libraries like JUnit, Mockito, and more.</p>
  597.  
  598.  
  599.  
  600. <p>IntelliJ IDEA provides <a href="https://www.jetbrains.com/idea/spring/" target="_blank" rel="noopener">full Spring support</a>. IntelliJ IDEA has Spring Initializr integration which allows you to create a new Spring project in just a few clicks right from the Welcome screen. What’s more, our IDE provides advanced coding assistance for Spring, including navigation, validating configurations, displaying autowired beans, etc.</p>
  601.  
  602.  
  603.  
  604. <figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/lxVVjvb_AhGFY9e6TczGcJV8D4Kub3uplaGj-6kuOyLqwm6lWQtLQndSgJ3fsBTL3zjmOHwOx5955XrqmmxG3LcLG1otexcBVy9iMCwa0OFUUBRvFnBbIPYspPtyKecq-JEzQlDGsxZZFoyzFdHGkmc" alt=""/></figure>
  605.  
  606.  
  607.  
  608. <h3 class="wp-block-heading">First Steps</h3>
  609.  
  610.  
  611.  
  612. <ul>
  613. <li><a href="https://spring.io/guides/gs/spring-boot" target="_blank" rel="noopener">Getting Started</a></li>
  614.  
  615.  
  616.  
  617. <li><a href="https://www.youtube.com/watch?v=5kOGdZmpSDI&amp;list=PLPZy-hmwOdEXMlGT26k1VQXKGyVb37td_" target="_blank" rel="noopener">Creating a Spring Boot &#8220;Hello World&#8221; Application with IntelliJ IDEA</a></li>
  618.  
  619.  
  620.  
  621. <li><a href="https://blog.jetbrains.com/idea/2024/02/build-a-spring-boot-app-with-ai-assistant/">Build a Spring Boot App with AI Assistant</a></li>
  622. </ul>
  623.  
  624.  
  625.  
  626. <h2 class="wp-block-heading">Micronaut&nbsp;</h2>
  627.  
  628.  
  629.  
  630. <p><a href="https://micronaut.io/" target="_blank" rel="noopener">Micronaut</a> is a JVM-based framework used for developing microservices or serverless applications. It&#8217;s designed to provide the tools and infrastructure for building scalable, high-performance applications with minimal memory footprint and startup time. The framework supports the Java, Kotlin, and Groovy languages. Micronaut shares some similarities with frameworks like Spring, yet it stands out for its unique features.</p>
  631.  
  632.  
  633.  
  634. <h3 class="wp-block-heading">Where to Use Micronaut</h3>
  635.  
  636.  
  637.  
  638. <p>It is excellent for developing microservice-based applications and is also useful in cloud environments like Docker and Kubernetes.</p>
  639.  
  640.  
  641.  
  642. <h3 class="wp-block-heading">Cool Features</h3>
  643.  
  644.  
  645.  
  646. <p><strong>Dependency injection</strong> happens at compile time instead of runtime, as in most frameworks. This method, unlike the traditional use of reflection and proxies, allows you to start the application faster and reduce memory usage.</p>
  647.  
  648.  
  649.  
  650. <p><strong>Reactive programming support</strong> supports reactive programming models, making it easier to handle asynchronous data flows and concurrency.</p>
  651.  
  652.  
  653.  
  654. <p><strong>Extensive integration</strong> provides seamless integration with a variety of databases, cloud services, and other tools, offering flexibility in application development.</p>
  655.  
  656.  
  657.  
  658. <figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/_HHSlNBUZSR97NRWxgcJ6xX5_MJf3mvmAfUtBWsC8YPlDy6TTwg0iKKUXwtS8GOl8R6FyY9nbYl_bLGTr1RBcQDbLIMbeaj5u6N0h5ASo0M1C-0aVWaSdnbty74o-fRxnR_Lcw9Q6V9bGzUQGQozxt8" alt=""/></figure>
  659.  
  660.  
  661.  
  662. <h3 class="wp-block-heading">First Steps</h3>
  663.  
  664.  
  665.  
  666. <ul>
  667. <li><a href="https://docs.micronaut.io/4.3.11/guide/#quickStart" target="_blank" rel="noopener">Quick Start</a></li>
  668.  
  669.  
  670.  
  671. <li><a href="https://guides.micronaut.io/latest/creating-your-first-micronaut-app.html" target="_blank" rel="noopener">Creating your first Micronaut application</a></li>
  672.  
  673.  
  674.  
  675. <li><a href="https://www.youtube.com/watch?v=KIp9PlyJOjg&amp;t=440s" target="_blank" rel="noopener">Developing Micronaut Applications with IntelliJ IDEA</a></li>
  676.  
  677.  
  678.  
  679. <li><a href="https://www.baeldung.com/micronaut" target="_blank" rel="noopener">Introduction to Micronaut</a></li>
  680. </ul>
  681.  
  682.  
  683.  
  684. <h2 class="wp-block-heading">Hibernate</h2>
  685.  
  686.  
  687.  
  688. <p><a href="https://hibernate.org/orm/" target="_blank" rel="noopener">Hibernate</a> is an open-source Object-Relational Mapping (ORM) framework for Java applications. It&#8217;s designed to simplify the development of data-driven applications. Hibernate has its own language, Hibernate Query Language (HQL), which uses objects instead of table names. Thanks to HQL, Hibernate can significantly reduce development time, make your code less error-prone, and easier to understand and maintain than raw SQL.&nbsp;</p>
  689.  
  690.  
  691.  
  692. <h3 class="wp-block-heading">Where to Use Hibernate</h3>
  693.  
  694.  
  695.  
  696. <p>Hibernate can be used in any Java application that interacts with a relational database.&nbsp;</p>
  697.  
  698.  
  699.  
  700. <h3 class="wp-block-heading">Cool Features&nbsp;</h3>
  701.  
  702.  
  703.  
  704. <p><strong>Lazy Loading</strong>: Your data is retrieved only when called, saving memory and improving performance.</p>
  705.  
  706.  
  707.  
  708. <p><strong>Cache Mechanism</strong>: This mechanism allows frequently used data to be stored in memory, which reduces database load and speeds up data retrieval in your application.</p>
  709.  
  710.  
  711.  
  712. <p><strong>Reduced Boilerplate Code</strong>: With Hibernate, you don&#8217;t have to write tedious JDBC code for CRUD (create, read, update, delete) operations. It manages the database operations in the background, thus reducing your development time.</p>
  713.  
  714.  
  715.  
  716. <p>IntelliJ IDEA offers coding assistance for Hibernate, such as autocompletion for HQL queries, handy inspections and quick-fixes, and the Hibernate console that allows you to run your HQL queries straight from the IDE.</p>
  717.  
  718.  
  719.  
  720. <figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/fR9jjO4uq7-wQdaZE4BkzGgif6wVtN83uX87OJm97Si59VGQqZh_vWh_khm0vuQgvvFkV92uIW5n5xJPh5x3NrWypuDK0Cry51zSZQEnRimpvaR5a_5gg8wqqZNvP2n2RFznbrqSuo-vgreWmQgv4CY" alt=""/></figure>
  721.  
  722.  
  723.  
  724. <h3 class="wp-block-heading">First Steps&nbsp;</h3>
  725.  
  726.  
  727.  
  728. <ul>
  729. <li><a href="https://www.jetbrains.com/help/idea/hibernate.html" target="_blank" rel="noopener">Hibernate</a></li>
  730.  
  731.  
  732.  
  733. <li><a href="https://www.geeksforgeeks.org/hibernate-tutorial/" target="_blank" rel="noopener">Hibernate Tutorial</a></li>
  734.  
  735.  
  736.  
  737. <li><a href="https://www.youtube.com/watch?v=QJddHc41xrM&amp;t=3s" target="_blank" rel="noopener">IntelliJ IDEA. Working with Hibernate/JPA</a></li>
  738.  
  739.  
  740.  
  741. <li><a href="https://www.digitalocean.com/community/tutorials/hibernate-tutorial-for-beginners" target="_blank" rel="noopener">Hibernate Tutorial For Beginners</a></li>
  742. </ul>
  743.  
  744.  
  745.  
  746. <h2 class="wp-block-heading">Apache Kafka&nbsp;</h2>
  747.  
  748.  
  749.  
  750. <p>While not a framework, <a href="https://kafka.apache.org/" target="_blank" rel="noopener">Apache Kafka</a> is an essential open-source stream processing platform for handling large amounts of data in real time. We consider it to be a very helpful asset for Java developers as it can scale up effortlessly without any downtime, making it great for managing big data projects.</p>
  751.  
  752.  
  753.  
  754. <p>Combining the various Kafka APIs for publishing or subscribing to one or more Kafka topics and the Kafka Streams API to implement stream processing gives you a good foundation for building scalable, decoupled applications.</p>
  755.  
  756.  
  757.  
  758. <h3 class="wp-block-heading">Where to Use Kafka</h3>
  759.  
  760.  
  761.  
  762. <p>Kafka is great for handling live data and constantly updating applications. It&#8217;s used on websites to track what users are doing and also in systems that need to share data between different parts.</p>
  763.  
  764.  
  765.  
  766. <h3 class="wp-block-heading">Cool Features&nbsp;</h3>
  767.  
  768.  
  769.  
  770. <p><strong>Decoupling</strong>: Apache Kafka helps systems and data streams work independently and asynchronously. This can be explained through basic terms. Kafka uses topics to organize data streams. Producers send messages to the topics without needing to know who will consume them and don’t wait for a consumer to be available. Consumers subscribe to topics and handle messages at their own speed without blocking the producer if it&#8217;s processing messages slowly.</p>
  771.  
  772.  
  773.  
  774. <p><strong>Fault tolerance</strong> in Apache Kafka means that even if something goes wrong, like a server crashing, Kafka can keep running without losing data. It does this by making copies of data and automatically switching to backups if needed.</p>
  775.  
  776.  
  777.  
  778. <p><strong>Integration with other systems</strong>: Kafka can integrate with a wide range of systems, including databases, file systems, stream processing frameworks, etc.</p>
  779.  
  780.  
  781.  
  782. <p>IntelliJ IDEA offers the <a href="https://www.jetbrains.com/help/idea/big-data-tools-kafka.html" target="_blank" rel="noopener">Kafka plugin</a>, which allows you to monitor your Kafka event streaming, make consumers, producers, and topics, and connect to Schema Registry to create and update schemas.</p>
  783.  
  784.  
  785.  
  786. <figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/Ln8yt5PP3F4jUxFd8f1yTdPUAJgbO77P4KXlh501xFV3Hz2vXRxI6Pgg1kl2A1riMnGIbG8b2atol44nSDS1eLz2CbdQ7HBvqs-RJjacrCOUR52p_YT2rEZNvdLHGMohOGthgjM2n5TtXb8U4BuVeQA" alt=""/></figure>
  787.  
  788.  
  789.  
  790. <h3 class="wp-block-heading">First Steps&nbsp;</h3>
  791.  
  792.  
  793.  
  794. <ul>
  795. <li><a href="https://kafka.apache.org/documentation/#quickstart" target="_blank" rel="noopener">Quick start&nbsp;</a></li>
  796.  
  797.  
  798.  
  799. <li><a href="https://kafka.apache.org/quickstart" target="_blank" rel="noopener">Apache Kafka Quickstart</a></li>
  800.  
  801.  
  802.  
  803. <li><a href="https://www.tutorialspoint.com/apache_kafka/index.htm" target="_blank" rel="noopener">Apache Kafka Tutorial</a></li>
  804.  
  805.  
  806.  
  807. <li><a href="https://www.youtube.com/watch?v=B5j3uNBH8X4]" target="_blank" rel="noopener">Apache Kafka Fundamentals</a></li>
  808. </ul>
  809.  
  810.  
  811.  
  812. <h2 class="wp-block-heading">JUnit 5</h2>
  813.  
  814.  
  815.  
  816. <p><a href="https://junit.org/junit5/" target="_blank" rel="noopener">JUnit 5</a> is a popular Java framework used for writing and running automated tests to check if your code is working as expected. JUnit 5 helps keep your code neat and readable, find and fix errors, boost software quality, and improve testing efficiency.</p>
  817.  
  818.  
  819.  
  820. <h3 class="wp-block-heading">Where to Use JUnit 5</h3>
  821.  
  822.  
  823.  
  824. <p>JUnit is predominantly used for unit testing of individual units of Java code (like methods or classes) in isolation from the rest of the application.</p>
  825.  
  826.  
  827.  
  828. <h3 class="wp-block-heading">Cool Features&nbsp;</h3>
  829.  
  830.  
  831.  
  832. <p><strong>Annotations</strong>. JUnit 5 annotations serve as special markers in Java code, offering</p>
  833.  
  834.  
  835.  
  836. <p>instructions to the JUnit 5 framework on test execution. For instance, @Test marks a method as a test method, while @Disabled skips the annotated test method during execution. @DisplayName allows you to write a display name for your test in a normal sentence.</p>
  837.  
  838.  
  839.  
  840. <p><strong>Assertions</strong> are the methods that verify that your code behaves as expected.</p>
  841.  
  842.  
  843.  
  844. <p><strong>Test runners</strong> are special programs that allow you to run tests and see the results, telling you which tests passed or failed.</p>
  845.  
  846.  
  847.  
  848. <p><strong>Test suites</strong>: This feature lets you group several tests and run them together.</p>
  849.  
  850.  
  851.  
  852. <p><strong>Parameterized tests</strong> allow you to run the same test multiple times with different sets of parameters, making sure the functionality works for different inputs.</p>
  853.  
  854.  
  855.  
  856. <p><strong>Nested tests</strong>: The @Nested annotation in JUnit 5 allows you to group several test methods within nested classes inside a main test class, helping to organize tests more clearly and adding expressiveness to your tests, making them easier to read and understand.</p>
  857.  
  858.  
  859.  
  860. <p>IntelliJ IDEA is fully integrated with the JUnit framework. To create a test for a specific class, you can simply right-click on it, select <em>Create test</em>, and choose JUnit 5 as a desired testing library. Running tests is also straightforward and easily accessible from the UI. It’s that simple!</p>
  861.  
  862.  
  863.  
  864. <figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/spBRx641Dm5jTvUVHd8r3sEbFAHVLmplPj_BSRYfIOETcnk6tzxqUSJazEQo5mCNSRtD3LzCPHb7GhWNqUfWATs5Kzf1SqKrg6OZyjJMFUImtJnIZahKN2eCOb1HBjtYv3vEBt-ztnqAT5Lp5ERmhkU" alt=""/></figure>
  865.  
  866.  
  867.  
  868. <h3 class="wp-block-heading">First Steps</h3>
  869.  
  870.  
  871.  
  872. <ul>
  873. <li><a href="https://junit.org/junit5/" target="_blank" rel="noopener">JUnit 5 documentation</a></li>
  874.  
  875.  
  876.  
  877. <li><a href="https://www.baeldung.com/junit-5" target="_blank" rel="noopener">A Guide to JUnit 5</a></li>
  878.  
  879.  
  880.  
  881. <li><a href="https://www.jetbrains.com/help/idea/junit.html" target="_blank" rel="noopener">Java Unit Testing with JUnit &#8211; Tutorial &#8211; How to Create And Use Unit Tests</a></li>
  882.  
  883.  
  884.  
  885. <li><a href="https://www.youtube.com/watch?v=we3zJE3hlWE" target="_blank" rel="noopener">IntelliJ IDEA. Writing Tests with JUnit 5</a>&nbsp;</li>
  886.  
  887.  
  888.  
  889. <li><a href="https://www.jetbrains.com/help/idea/junit.html" target="_blank" rel="noopener">JUnit 5</a></li>
  890. </ul>
  891.  
  892.  
  893.  
  894. <h2 class="wp-block-heading">Mockito&nbsp;</h2>
  895.  
  896.  
  897.  
  898. <p><a href="https://site.mockito.org/" target="_blank" rel="noopener">Mockito</a> is a popular mocking framework for unit tests in Java. It allows you to create mock objects in automated unit tests that mimic the real objects in your tests. For instance, if your code needs to fetch data from a database, Mockito allows you to set up a mock database that returns the required test data, so you don&#8217;t have to use the actual database.&nbsp;</p>
  899.  
  900.  
  901.  
  902. <h3 class="wp-block-heading">Where to Use Mockito</h3>
  903.  
  904.  
  905.  
  906. <p>You can use Mockito in unit tests to isolate code units by mocking their dependencies.</p>
  907.  
  908.  
  909.  
  910. <h3 class="wp-block-heading">Cool Features</h3>
  911.  
  912.  
  913.  
  914. <p><strong>Automated mock creation</strong>: You can create mocks with the @Mock annotation to reduce boilerplate code in your tests. </p>
  915.  
  916.  
  917.  
  918. <p><strong>Spying</strong> allows you to use real objects in your tests, calling all their methods except the ones you choose to stub. </p>
  919.  
  920.  
  921.  
  922. <p><strong>Methods stubbing</strong>: Stubs define how a mocked method should behave when invoked. For example, you can make a method return a specific value or throw an error when tested. This helps you check how your code works in different situations without using the actual methods.</p>
  923.  
  924.  
  925.  
  926. <p><strong>ArgumentCaptor</strong> lets you capture and examine an argument passed to a method, which is very helpful when the argument isn&#8217;t accessible outside the method you&#8217;re testing.</p>
  927.  
  928.  
  929.  
  930. <figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/P7xRDGv5-XmZ9vwsS3_YkUy05UPxD5X_UYFtqtCzSFO2QtOC_ExZJ2EHaQLw8hSu0TqIp7vcxol-V6ery1bRx6g4anpVkrlZiUOespgGcxgBio7OsWzmKoJIQanSoQJ0Dl9bV382k-l1rYLyHpE225M" alt=""/></figure>
  931.  
  932.  
  933.  
  934. <h3 class="wp-block-heading">First Steps</h3>
  935.  
  936.  
  937.  
  938. <ul>
  939. <li><a href="https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html" target="_blank" rel="noopener">Mockito documentation</a></li>
  940.  
  941.  
  942.  
  943. <li><a href="https://site.mockito.org/" target="_blank" rel="noopener">Mockito</a><a href="http://site.mockito.org" target="_blank" rel="noopener"> website</a></li>
  944.  
  945.  
  946.  
  947. <li><a href="https://www.baeldung.com/mockito-series" target="_blank" rel="noopener">Mockito Tutorial</a></li>
  948.  
  949.  
  950.  
  951. <li><a href="https://medium.com/@AlexanderObregon/getting-started-with-unit-testing-in-intellij-idea-junit-and-mockito-32e1eee739d9" target="_blank" rel="noopener">Getting Started with Unit Testing in IntelliJ IDEA: JUnit and Mockito</a></li>
  952.  
  953.  
  954.  
  955. <li><a href="https://www.simplilearn.com/tutorials/devops-tutorial/mockito-junit" target="_blank" rel="noopener">Mockito JUnit: Create Your First Code in Mockito</a></li>
  956. </ul>
  957.  
  958.  
  959.  
  960. <h2 class="wp-block-heading">WireMock</h2>
  961.  
  962.  
  963.  
  964. <p><a href="https://wiremock.org/" target="_blank" rel="noopener">WireMock</a> is another framework that can help you create stubs and mocks. However, this time, the framework simulates HTTP-based APIs. It acts as a real web server that is capable of providing stubbed responses to a client&#8217;s requests.</p>
  965.  
  966.  
  967.  
  968. <h3 class="wp-block-heading">Where to Use WireMock</h3>
  969.  
  970.  
  971.  
  972. <p>Use WireMock when you want to test your application&#8217;s interaction with external HTTP services, during the development of a microservice that depends on other services, or to create detailed logs for debugging complex issues, without having to use those actual services.</p>
  973.  
  974.  
  975.  
  976. <h3 class="wp-block-heading">Cool Features</h3>
  977.  
  978.  
  979.  
  980. <p><strong>Fault Simulation</strong>: WireMock allows you to simulate problems such as delays, connection resets, and random noise, mimicking an unreliable server or network.&nbsp;</p>
  981.  
  982.  
  983.  
  984. <p><strong>Request Matching</strong>: It is possible to match incoming requests by URL, HTTP method, headers, and body content to determine the appropriate response.</p>
  985.  
  986.  
  987.  
  988. <p><strong>Record and Playback</strong>: It is capable of recording requests to a real service and then playing them back, which is useful for creating mocks based on actual service behavior.</p>
  989.  
  990.  
  991.  
  992. <p>Starting from version 2024.1, IntelliJ IDEA comes with the WireMock plugin.&nbsp;</p>
  993.  
  994.  
  995.  
  996. <figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/sGcFrToBi0yDOCz5Yf4ld-SU_c217_9hAFe5vVNMOaF6Tm_GzrOw395Mxr3qXAbRFOl9A4wFhqBU77eCD1xBqr1q3ojVFCUdXrh-gjazgI9qc7KnQcQb44wxBA0YQZdQNp6d8zMMz9Z74tdTZgmrMXk" alt=""/></figure>
  997.  
  998.  
  999.  
  1000. <h3 class="wp-block-heading">First Steps</h3>
  1001.  
  1002.  
  1003.  
  1004. <ul>
  1005. <li><a href="https://wiremock.org/docs/getting-started/" target="_blank" rel="noopener">WireMock Tutorials</a></li>
  1006.  
  1007.  
  1008.  
  1009. <li><a href="https://www.youtube.com/watch?v=3FjkNXreo9A&amp;list=PL4V1b_lhwTrWf10Q0BUepsBqn4fMZ3q4u&amp;index=6" target="_blank" rel="noopener">WireMock intro</a></li>
  1010.  
  1011.  
  1012.  
  1013. <li><a href="https://www.baeldung.com/introduction-to-wiremock" target="_blank" rel="noopener">Introduction to WireMock</a></li>
  1014. </ul>
  1015.  
  1016.  
  1017.  
  1018. <h2 class="wp-block-heading">Testcontainers&nbsp;</h2>
  1019.  
  1020.  
  1021.  
  1022. <p><a href="https://testcontainers.com/" target="_blank" rel="noopener">Testcontainers</a> is another framework for testing your application. It focuses on integration testing, which checks how different parts of an application work together. It is designed for situations where you need to write integration tests with other services that should be running during your tests.</p>
  1023.  
  1024.  
  1025.  
  1026. <h3 class="wp-block-heading">Where to Use Testcontainers</h3>
  1027.  
  1028.  
  1029.  
  1030. <p>Testcontainers is ideal for integration tests and for testing the full flow of an application in an environment that imitates production setup.&nbsp;</p>
  1031.  
  1032.  
  1033.  
  1034. <h3 class="wp-block-heading">Cool Features&nbsp;</h3>
  1035.  
  1036.  
  1037.  
  1038. <p><strong>Test isolation</strong> guarantees that your tests will not affect each other’s data.</p>
  1039.  
  1040.  
  1041.  
  1042. <p><strong>Support for various technologies</strong>: Testcontainers supports databases like MySQL, Postgres, MongoDB, and others. It also works with Selenium browser environments for end-to-end tests, and message brokers like RabbitMQ, Kafka, etc.</p>
  1043.  
  1044.  
  1045.  
  1046. <p><strong>Easy integration with JUnit</strong> allows you to effortlessly add tests that use containers to your current tests.&nbsp;</p>
  1047.  
  1048.  
  1049.  
  1050. <p><strong>Automatic clean-up</strong>: Testcontainers removes everything it uses, like containers, volumes, or networks, after the tests are done. This keeps your testing space tidy and helps avoid resource leaks.</p>
  1051.  
  1052.  
  1053.  
  1054. <p>You can use Testcontainers in IntelliJ IDEA with your test framework of choice, for example with JUnit.</p>
  1055.  
  1056.  
  1057.  
  1058. <figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/t8h3A6cEORmv0OOtvl-QFKRcipR6WXONgvz0B2vxTkNu_I8ew7xdXySYfdBfAN3d0zhkFNzxNeQrYdEycrgl5anEsiGqbEPSLaQyVDQw3VQyH78i2ycsS9ahXWtVhufSnNVUQGrnHZwgilV43FEUQQA" alt=""/></figure>
  1059.  
  1060.  
  1061.  
  1062. <h3 class="wp-block-heading">First Steps</h3>
  1063.  
  1064.  
  1065.  
  1066. <ul>
  1067. <li><a href="https://testcontainers.com/guides/" target="_blank" rel="noopener">Getting Started Guides</a></li>
  1068.  
  1069.  
  1070.  
  1071. <li><a href="https://www.youtube.com/watch?v=v3eQCIWLYOw" target="_blank" rel="noopener">Testcontainers – From Zero to Hero</a></li>
  1072.  
  1073.  
  1074.  
  1075. <li><a href="https://www.youtube.com/watch?v=zfN8m9Dh9cs" target="_blank" rel="noopener">Mastering Testcontainers for Better Integration Tests</a></li>
  1076. </ul>
  1077.  
  1078.  
  1079.  
  1080. <h2 class="wp-block-heading">Awaitility</h2>
  1081.  
  1082.  
  1083.  
  1084. <p><a href="https://github.com/awaitility/awaitility" target="_blank" rel="noopener">Awaitility</a> is a small open-source Java DSL library that simplifies testing asynchronous systems. This means that it lets the tests wait until an asynchronous operation finishes or a specific condition is met, which is very helpful for testing concurrent systems.</p>
  1085.  
  1086.  
  1087.  
  1088. <h3 class="wp-block-heading">Where to Use Awaitility</h3>
  1089.  
  1090.  
  1091.  
  1092. <p>Use Awaitility when writing tests that include asynchronous operations, such as:</p>
  1093.  
  1094.  
  1095.  
  1096. <ul>
  1097. <li>Ensuring actions are completed within a specific time frame.</li>
  1098.  
  1099.  
  1100.  
  1101. <li>Testing web services or similar systems where responses can be delayed.</li>
  1102.  
  1103.  
  1104.  
  1105. <li>Checking conditions in multithreaded or concurrent systems within a defined period.</li>
  1106. </ul>
  1107.  
  1108.  
  1109.  
  1110. <h3 class="wp-block-heading">Cool Features</h3>
  1111.  
  1112.  
  1113.  
  1114. <p><strong>Timeout:</strong> Awaitility allows you to set a timeout for a specific condition in a test. If the condition isn&#8217;t met within this time limit, it stops the test, preventing it from running forever.</p>
  1115.  
  1116.  
  1117.  
  1118. <p><strong>Custom conditions</strong>: Beyond just using timeouts, you can create specific conditions for more flexible testing in various scenarios.&nbsp;</p>
  1119.  
  1120.  
  1121.  
  1122. <p><strong>DSL Syntax</strong>: Offers an easy, explicit syntax for specifying conditions, making tests easier to understand and maintain.</p>
  1123.  
  1124.  
  1125.  
  1126. <figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/SFW9Zh-0uAgopAA2se1ETSJhron4AciJEnLdDrrT6JpMpW7st4iBI0WorwzEEQkEgjj65LUc9zusTn34P3VvnOUOXliKC_RoSLeG_OxVwL-jcNIUflU6MsIE6L2aWNNxEft8INh6CwmBEE3j_03TSE0" alt=""/></figure>
  1127.  
  1128.  
  1129.  
  1130. <h3 class="wp-block-heading">First Steps</h3>
  1131.  
  1132.  
  1133.  
  1134. <ul>
  1135. <li><a href="https://github.com/awaitility" target="_blank" rel="noopener">Awaitility</a></li>
  1136.  
  1137.  
  1138.  
  1139. <li><a href="https://www.baeldung.com/awaitility-testing" target="_blank" rel="noopener">Introduction to Awaitility</a></li>
  1140.  
  1141.  
  1142.  
  1143. <li><a href="https://www.youtube.com/watch?v=JVPHSdHViMg" target="_blank" rel="noopener">7 Awesome Libraries for Java Unit &amp; Integration Testing</a></li>
  1144. </ul>
  1145.  
  1146.  
  1147.  
  1148. <h2 class="wp-block-heading">Jackson</h2>
  1149.  
  1150.  
  1151.  
  1152. <p><a href="https://github.com/FasterXML/jackson" target="_blank" rel="noopener">Jackson</a> is a comprehensive library for reading, writing, and manipulating JSON data in Java applications. With its help, you can parse JSON to Java objects and serialize Java objects to JSON.</p>
  1153.  
  1154.  
  1155.  
  1156. <h3 class="wp-block-heading">Where to Use Jackson</h3>
  1157.  
  1158.  
  1159.  
  1160. <p>Jackson is highly versatile and can exchange data over RESTful APIs, persisting Java objects to JSON files, and processing external JSON data.&nbsp;</p>
  1161.  
  1162.  
  1163.  
  1164. <h3 class="wp-block-heading">Cool Features</h3>
  1165.  
  1166.  
  1167.  
  1168. <p><strong>Java annotations support</strong>: Jackson allows developers to use Java annotations extensively, giving them significant control over the serialization and deserialization processes.</p>
  1169.  
  1170.  
  1171.  
  1172. <p><strong>Streaming API</strong>: It offers a fast, efficient method to read and write JSON, which is ideal for handling large JSON files or data streams with minimal resource usage.</p>
  1173.  
  1174.  
  1175.  
  1176. <p><strong>Support for various data formats</strong>: Jackson can work with various data formats such as JSON, XML, CSV, and YAML.</p>
  1177.  
  1178.  
  1179.  
  1180. <h4 class="wp-block-heading"><img decoding="async" loading="lazy" src="https://lh7-us.googleusercontent.com/-a-NXRls0qSO7lJOJceP4rm6oKgUcjE60zc-7JbqNO496q_ji1lXvpdokVy0C5H2WglIZ7KJUnlGqqWi-7CiK0Sx_tc-wOeahcTRWYnPDKm3Na2o8YVTrn1pbfo8ZfIi25MFfgdGSVntyUgLjAD8nQ4" width="624" height="247"></h4>
  1181.  
  1182.  
  1183.  
  1184. <h3 class="wp-block-heading">First Steps</h3>
  1185.  
  1186.  
  1187.  
  1188. <ul>
  1189. <li><a href="https://www.baeldung.com/jackson" target="_blank" rel="noopener">Jackson JSON Tutorial</a></li>
  1190.  
  1191.  
  1192.  
  1193. <li><a href="https://github.com/FasterXML/jackson-docs" target="_blank" rel="noopener">Tutorials</a></li>
  1194.  
  1195.  
  1196.  
  1197. <li><a href="https://www.youtube.com/watch?v=Hv_a3ZBSO_g" target="_blank" rel="noopener">Parsing JSON in Java Tutorial &#8211; Part 1: Jackson and Simple Objects</a></li>
  1198. </ul>
  1199.  
  1200.  
  1201.  
  1202. <p></p>
  1203.  
  1204.  
  1205.  
  1206. <p>That is it for today! We&#8217;ve introduced a variety of frameworks and tools for Java developers, including major ones like Spring and supportive technologies like Hibernate, PostgreSQL, Jackson, and Apache Kafka. Additionally, we&#8217;ve showcased testing frameworks and tools like JUnit, Testcontainers, Awaitility, Mockito, and WireMock to help you test your apps. Many Java applications, both small and large, will be built on top of one or several of these, so be sure to explore what they have to offer.</p>
  1207. ]]></content:encoded>
  1208. <media:content url="https://www.youtube.com/embed/5kOGdZmpSDI" medium="video" width="1280" height="720">
  1209. <media:player url="https://www.youtube.com/embed/5kOGdZmpSDI" />
  1210. <media:title type="plain">Creating a Spring Boot &quot;Hello World&quot; Application with IntelliJ IDEA</media:title>
  1211. <media:description type="html"><![CDATA[In this screencast, we’re going to create a simple Spring Boot Hello World application which will display some text locally in our browser.*Author: Helen Sco...]]></media:description>
  1212. <media:thumbnail url="https://blog.jetbrains.com/wp-content/uploads/2024/04/ij-release-featured_blog_1280x720.png" />
  1213. <media:rating scheme="urn:simple">nonadult</media:rating>
  1214. </media:content>
  1215. </item>
  1216. <item>
  1217. <title>The WireMock Plugin for IntelliJ IDEA Is Here!</title>
  1218. <link>https://blog.jetbrains.com/idea/2024/04/the-wiremock-plugin-for-intellij-idea-is-here/</link>
  1219. <dc:creator><![CDATA[Khalid Abuhakmeh]]></dc:creator>
  1220. <pubDate>Fri, 05 Apr 2024 08:25:00 +0000</pubDate>
  1221. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2024/03/ij-release-featured_blog_1280x720-2.png</featuredImage> <category><![CDATA[intellij-idea]]></category>
  1222. <category><![CDATA[plugins]]></category>
  1223. <category><![CDATA[wiremock]]></category>
  1224. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=456249</guid>
  1225.  
  1226. <description><![CDATA[The scariest phrase for anyone testing web-dependent codebases is “third-party service”. In the modern landscape, it feels like almost every part of our application hinges on some external cloud-based dependency. Tests help us feel confident about our logic and that our code can handle both expected and unexpected situations. However, third-party services, and especially web [&#8230;]]]></description>
  1227. <content:encoded><![CDATA[
  1228. <p>The scariest phrase for anyone testing web-dependent codebases is “third-party service”. In the modern landscape, it feels like almost every part of our application hinges on some external cloud-based dependency. Tests help us feel confident about our logic and that our code can handle both expected and unexpected situations. However, third-party services, and especially web APIs, can be a huge pain to set up and manage, leading many developers to skip testing critical parts of their codebase. At JetBrains, we hope that a new plugin will help you write more tests, feel more confident about implementing features, and ultimately ship better software.</p>
  1229.  
  1230.  
  1231.  
  1232. <p>In this post, we’ll take a quick look at the new WireMock plugin introduced with <a href="https://www.jetbrains.com/idea/whatsnew/" target="_blank" rel="noopener">IntelliJ IDEA 2024.1</a>. It works in all JetBrains IDEs and provides developers with a built-in mock server. We’ll also explore a few features that should <code><em>GET</em></code> you excited.</p>
  1233.  
  1234.  
  1235.    <div class="buttons">
  1236.        <div class="buttons__row">
  1237.                                                <a href="https://plugins.jetbrains.com/plugin/23695-wiremock" class="btn" target="" rel="noopener">Install the WireMock plugin now</a>
  1238.                                                    </div>
  1239.    </div>
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247. <h2 class="wp-block-heading">What is WireMock?</h2>
  1248.  
  1249.  
  1250.  
  1251. <p><a href="https://wiremock.org/" target="_blank" rel="noopener">WireMock</a> is a popular open-source tool for API mock testing that allows developers to create stable test and development environments. WireMock offers a suite of features, including JUnit support, JSON templates, and record and playback tools for easy capture and request playback. In addition to HTTP APIs, WireMock supports newer formats and protocols such as webhooks, gRPC, and GraphQL.</p>
  1252.  
  1253.  
  1254.  
  1255. <p>If your application code calls a web service of any kind, WireMock can stub out endpoints to replace those calls, helping you write better software.</p>
  1256.  
  1257.  
  1258.  
  1259. <h2 class="wp-block-heading">IntelliJ IDEA WireMock plugin</h2>
  1260.  
  1261.  
  1262.  
  1263. <p>While you could use the WireMock suite to write stubs in Java JUnit tests for your HTTP services, the WireMock mock API template option is a cleaner and more manageable approach. Templates use a JSON file format to simulate any endpoint, and there’s even <a href="https://library.wiremock.org/" target="_blank" rel="noopener">a public WireMock template library for popular third-party APIs</a>. The one catch is that you must run a WireMock server to handle user requests. Luckily, the <a href="https://plugins.jetbrains.com/plugin/23695-wiremock" target="_blank" rel="noopener">WireMock plugin</a> is an embedded WireMock server in your JetBrains IDE.</p>
  1264.  
  1265.  
  1266.  
  1267. <p>Let’s look at running a simple API. The popular <a href="https://xkcd.com/" target="_blank" rel="noopener">XKCD comic</a> has a two-endpoint API that returns the latest comic and the associated metadata. You can find the <a href="https://library.wiremock.org/catalog/api/x/xkcd.com/xkcd-com/" target="_blank" rel="noopener">WireMock template API here</a>. Placing the template in a mappings folder, you’ll immediately notice the WireMock server icon in the top-right corner.</p>
  1268.  
  1269.  
  1270.  
  1271. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="1600" height="1230" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/image-27.png" alt="" class="wp-image-456287"/></figure>
  1272.  
  1273.  
  1274.  
  1275. <p>Clicking the icon will start the WireMock server and attach the current template for the XKCD API. You should see the WireMock server running in the <em>Services</em> tool window.</p>
  1276.  
  1277.  
  1278.  
  1279. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="1600" height="1152" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/image-28.png" alt="" class="wp-image-456298"/></figure>
  1280.  
  1281.  
  1282.  
  1283. <p>To test the server is up and running, you can use the built-in HTTP Client to make the appropriate HTTP requests and view the JSON response.</p>
  1284.  
  1285.  
  1286.  
  1287. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="1600" height="1152" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/image-29.png" alt="" class="wp-image-456309"/></figure>
  1288.  
  1289.  
  1290.  
  1291. <p>If you’re an API author, the WireMock plugin also offers ways to quickly author stubs using the <em>Endpoints</em> tool window. Right-click any HTTP endpoint and choose the <em>Generate WireMock Stubs</em><strong> </strong>option.</p>
  1292.  
  1293.  
  1294.  
  1295. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="976" height="741" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/image-30.png" alt="" class="wp-image-456320"/></figure>
  1296.  
  1297.  
  1298.  
  1299. <p>IntelliJ IDEA will place any generated stubs in the<em> WireMock Stubs</em> directory under the <em>Scratches and Consoles</em><strong> </strong>section of the <em>Project</em> tool window. From here, you can modify the JSON template with full schema support and code completion. Similar to the previous template, you can launch these stubs using the built-in WireMock server.</p>
  1300.  
  1301.  
  1302.  
  1303. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="1600" height="1152" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/image-31.png" alt="" class="wp-image-456331"/></figure>
  1304.  
  1305.  
  1306.  
  1307. <h2 class="wp-block-heading">Conclusion</h2>
  1308.  
  1309.  
  1310.  
  1311. <p>WireMock is a fantastic option for web developers working with homegrown or consuming third-party APIs. The new WireMock plugin brings an improved workflow for working with and authoring WireMock templates, helping you deliver the quality software your users deserve.</p>
  1312.  
  1313.  
  1314.  
  1315. <p>To try it out, <a href="https://www.jetbrains.com/idea/" target="_blank" rel="noopener">download IntelliJ IDEA</a> and look for the WireMock plugin in the <em>Marketplace</em> tab, or <a href="https://plugins.jetbrains.com/plugin/23695-wiremock" target="_blank" rel="noopener">install it directly from JetBrains Marketplace</a>.</p>
  1316. ]]></content:encoded>
  1317. </item>
  1318. <item>
  1319. <title>IntelliJ IDEA 2024.1 Is Out!</title>
  1320. <link>https://blog.jetbrains.com/idea/2024/04/intellij-idea-2024-1/</link>
  1321. <dc:creator><![CDATA[Maria Kosukhina]]></dc:creator>
  1322. <pubDate>Thu, 04 Apr 2024 10:00:54 +0000</pubDate>
  1323. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2024/03/IntelliJ-IDEA-2024.1.png</featuredImage> <category><![CDATA[releases]]></category>
  1324. <category><![CDATA[intellij-idea]]></category>
  1325. <category><![CDATA[intellij-idea-2024-1]]></category>
  1326. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=459494</guid>
  1327.  
  1328. <description><![CDATA[IntelliJ IDEA 2024.1 has been released with an array of exciting upgrades to help streamline your workflows.&#160; You can get the latest build from our website, through the free Toolbox App, or via snaps for Ubuntu. Download IntelliJ IDEA 2024.1 IntelliJ IDEA Ultimate now boasts full line code completion, providing comprehensive code-aware suggestions for entire [&#8230;]]]></description>
  1329. <content:encoded><![CDATA[
  1330. <p>IntelliJ IDEA 2024.1 has been released with an array of exciting upgrades to help streamline your workflows.&nbsp;</p>
  1331.  
  1332.  
  1333.  
  1334. <p>You can get the latest build from our <a href="https://www.jetbrains.com/idea/download/" target="_blank" rel="noopener">website</a>, through the free <a href="https://www.jetbrains.com/toolbox-app/" target="_blank" rel="noopener">Toolbox App</a>, or via snaps for Ubuntu.</p>
  1335.  
  1336.  
  1337.  
  1338. <p align="center"><a class="jb-download-button" href="https://www.jetbrains.com/idea/download/" target="_blank" rel="noopener">Download IntelliJ IDEA 2024.1</a></p>
  1339.  
  1340.  
  1341.  
  1342. <p>IntelliJ IDEA Ultimate now boasts full line code completion, providing comprehensive code-aware suggestions for entire lines of code. Support for Java 22 ensures compatibility with the latest language features. The overhauled terminal enhances command-line operations, while sticky lines in the editor facilitate smoother navigation through codebases.&nbsp;</p>
  1343.  
  1344.  
  1345.  
  1346. <p>Watch this video overview to catch up on the major enhancements introduced in the new version:&nbsp;</p>
  1347.  
  1348.  
  1349.  
  1350. <figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
  1351. <iframe loading="lazy" title="What&#039;s New in IntelliJ IDEA 2024.1" width="500" height="281" src="https://www.youtube.com/embed/FuvoOm4TIxE?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
  1352. </div></figure>
  1353.  
  1354.  
  1355.  
  1356. <p>There are dozens of other improvements to various parts of the IDE in v2024.1 listed in this blog post. For a comprehensive overview of the new features, visit our <a href="https://www.jetbrains.com/idea/whatsnew/?_gl=1*x63l2d*_ga*MjIxMjc4ODkwLjE2OTEwNzM4OTY.*_ga_9J976DJZ68*MTcxMDUwMjcyNC41Ny4xLjE3MTA1MDI3MzMuNTEuMC4w&amp;_ga=2.129096580.929882275.1710498013-221278890.1691073896&amp;_gac=1.47958357.1709029336.CjwKCAiArfauBhApEiwAeoB7qHgjwBYX6xNOBUjYSu8cVwbj_KNNaLTOWj58mSVm6ItzgLJCgOWgOBoC3VIQAvD_BwE" target="_blank" rel="noopener">What’s New page</a>.</p>
  1357.  
  1358.  
  1359.  
  1360. <h2 class="wp-block-heading">Key highlights</h2>
  1361.  
  1362.  
  1363.  
  1364. <ul>
  1365. <li>IntelliJ IDEA Ultimate 2024.1 enhances coding efficiency with full line code completion, predicting and suggesting entire lines of code based on contextual analysis. It is powered by ML models trained for various languages and frameworks that run locally, ensuring the privacy of your data. Included with your subscription, it&#8217;s pre-enabled for Java and Kotlin, with customization options available for other languages. Learn more in this <a href="https://blog.jetbrains.com/blog/2024/04/04/full-line-code-completion-in-jetbrains-ides-all-you-need-to-know/">blog post</a>.</li>
  1366.  
  1367.  
  1368.  
  1369. <li>The IDE provides full support for the latest Java 22 features. Learn more in this <a href="https://blog.jetbrains.com/idea/2024/03/java-22-and-intellij-idea/">blog post</a>.&nbsp;</li>
  1370.  
  1371.  
  1372.  
  1373. <li>Version 2024.1 introduces an overhauled terminal featuring both visual and functional enhancements to streamline command-line tasks. Learn more in this <a href="https://blog.jetbrains.com/idea/2024/02/the-new-terminal-beta-is-now-in-jetbrains-ides/">blog post</a>.</li>
  1374.  
  1375.  
  1376.  
  1377. <li>We’ve introduced sticky lines in the editor to simplify working with large files and exploring new codebases. This feature keeps key structural elements, like the beginnings of classes or methods, pinned to the top of the editor as you scroll and provides an option to promptly navigate through the code by clicking on a pinned line.</li>
  1378. </ul>
  1379.  
  1380.  
  1381.  
  1382. <h2 class="wp-block-heading">AI Assistant&nbsp;</h2>
  1383.  
  1384.  
  1385.  
  1386. <ul>
  1387. <li>AI Assistant has received several valuable updates, including improved test generation and cloud code completion, custom prompts for commit messages, the ability to create files from code snippets, and updated in-editor code generation. You can get more information about the latest improvements in this <a href="https://blog.jetbrains.com/blog/2024/04/04/jetbrains-ai-assistant-2024-1-updates/" data-type="link" data-id="https://blog.jetbrains.com/blog/2024/04/04/jetbrains-ai-assistant-2024-1-updates/">blog post</a>. Please note that in version 2024.1, AI Assistant has been unbundled and is now available as a separate <a href="https://plugins.jetbrains.com/plugin/22282-ai-assistant" target="_blank" rel="noopener">plugin</a>. </li>
  1388.  
  1389.  
  1390.  
  1391. <li>We’ve enhanced code highlighting for Java and Kotlin within AI Assistant’s responses. Code in the AI chat is now highlighted just as it would be in the editor.</li>
  1392. </ul>
  1393.  
  1394.  
  1395.  
  1396. <h2 class="wp-block-heading">User experience</h2>
  1397.  
  1398.  
  1399.  
  1400. <ul>
  1401. <li>Basic IDE functionalities like code highlighting and completion now work for Java and Kotlin during project indexing, which should enhance your startup experience.&nbsp;</li>
  1402.  
  1403.  
  1404.  
  1405. <li>You can now scale the IDE down to 90%, 80%, or 70%, giving you the flexibility to adjust the size of IDE elements both upward and downward.</li>
  1406.  
  1407.  
  1408.  
  1409. <li>We’ve made slight adjustments to the layout of the <em>New Project</em> wizard, positioning the language list in the upper left-hand corner.</li>
  1410. </ul>
  1411.  
  1412.  
  1413.  
  1414. <h2 class="wp-block-heading">Java</h2>
  1415.  
  1416.  
  1417.  
  1418. <ul>
  1419. <li>IntelliJ IDEA 2024.1 introduces the ability to inject languages into string templates.&nbsp;</li>
  1420.  
  1421.  
  1422.  
  1423. <li>We’ve made a range of changes to enhance logging workflows.&nbsp;</li>
  1424.  
  1425.  
  1426.  
  1427. <li>We’ve implemented new inspections and quick-fixes. You can learn more in this <a href="https://blog.jetbrains.com/idea/2024/02/intellij-idea-2024-1-eap-7/#new-inspections-and-quick-fixes">blog post</a>.</li>
  1428.  
  1429.  
  1430.  
  1431. <li>The IDE now offers an enhanced user experience with multi-release JAR libraries.</li>
  1432.  
  1433.  
  1434.  
  1435. <li>We&#8217;ve revamped the <em>Conflicts Detected</em> dialog. It now features an updated UI, ensuring better readability and easy navigation.&nbsp;</li>
  1436.  
  1437.  
  1438.  
  1439. <li>We’ve implemented a new inlay hint for the <em>Rename </em>refactoring, positioning it on top of the changed code element for easy accessibility.&nbsp;</li>
  1440. </ul>
  1441.  
  1442.  
  1443.  
  1444. <h2 class="wp-block-heading">Kotlin</h2>
  1445.  
  1446.  
  1447.  
  1448. <ul>
  1449. <li>IntelliJ IDEA 2024.1 introduces the new Kotlin K2 mode, leveraging the embedded K2 Kotlin compiler for enhanced Kotlin code analysis. <a href="https://blog.jetbrains.com/idea/2024/03/k2-kotlin-mode-alpha-in-intellij-idea/" data-type="link" data-id="https://blog.jetbrains.com/idea/2024/03/k2-kotlin-mode-alpha-in-intellij-idea/">Learn more.</a>&nbsp;</li>
  1450.  
  1451.  
  1452.  
  1453. <li>Starting from version 2024.1, the IDE uniformly applies the official Kotlin style guide as the default option for all projects, unless explicitly specified otherwise.</li>
  1454.  
  1455.  
  1456.  
  1457. <li>The IDE now accurately preserves static imports, ensuring they are transferred exactly as they appear in the source code.</li>
  1458. </ul>
  1459.  
  1460.  
  1461.  
  1462. <h2 class="wp-block-heading">Scala&nbsp;&nbsp;</h2>
  1463.  
  1464.  
  1465.  
  1466. <ul>
  1467. <li>We&#8217;ve enhanced Scala 3 support, including better recognition of modifier mixes, improved indentation handling for cut and paste operations, and the proper association of end markers with their syntax structures.&nbsp;</li>
  1468.  
  1469.  
  1470.  
  1471. <li>Debugger support for Scala 3 has been enhanced, and autocompletion now accurately handles cases when it is used together with the using and given keywords or with unapply signatures.</li>
  1472.  
  1473.  
  1474.  
  1475. <li>We’ve improved code highlighting in Scaladoc popups and in the quick documentation popup.&nbsp;</li>
  1476.  
  1477.  
  1478.  
  1479. <li>Compiler-based highlighting has been improved.</li>
  1480.  
  1481.  
  1482.  
  1483. <li>The IDE now adds a <code>.gitignore</code> file to new SBT projects.</li>
  1484.  
  1485.  
  1486.  
  1487. <li>We added Play 3 to the list of supported versions for smooth compatibility of Play, Scala, and JDK versions.</li>
  1488. </ul>
  1489.  
  1490.  
  1491.  
  1492. <h2 class="wp-block-heading">Version control systems</h2>
  1493.  
  1494.  
  1495.  
  1496. <ul>
  1497. <li>Version 2024.1 introduces an enhanced code review experience for both GitHub and GitLab users with the implementation of a new in-editor review mode. <a href="https://blog.jetbrains.com/idea/2024/02/intellij-idea-2024-1-eap-6/#in-editor-code-review">Learn more.</a></li>
  1498.  
  1499.  
  1500.  
  1501. <li>For GitHub, GitLab, and Space, it is now possible to see changes in a certain branch in a separate <em>Log</em> tab within the <em>Git</em> tool window.</li>
  1502.  
  1503.  
  1504.  
  1505. <li>This release brings support for posting reactions to review comments for GitHub pull requests and GitLab merge requests.</li>
  1506.  
  1507.  
  1508.  
  1509. <li>There’s a new column in the <em>Log</em> tab of the<em> Git</em> tool window, allowing you to easily review the results of GitHub commit checks performed by your CI system. &nbsp;</li>
  1510.  
  1511.  
  1512.  
  1513. <li>After pushing changes to version control, the IDE now alerts you with a single notification, suggesting an action to create a pull/merge request.</li>
  1514.  
  1515.  
  1516.  
  1517. <li>We&#8217;ve added visual indicators to notify you of pending updates in your code review workflow.</li>
  1518.  
  1519.  
  1520.  
  1521. <li>The IDE now helps you avoid committing oversized files by notifying you of the restriction.</li>
  1522.  
  1523.  
  1524.  
  1525. <li>The merge dialog now includes the <em>Allow unrelated histories</em> option, making it possible to merge branches with no common history.</li>
  1526.  
  1527.  
  1528.  
  1529. <li>In the <em>Git </em>tool window, the <em>Show all branches</em> button has been replaced with a branch filter, allowing you to review changes made to a file within a designated branch.</li>
  1530.  
  1531.  
  1532.  
  1533. <li>We’ve added a <em>Stash</em> tab in the <em>Commit</em> window for quick access to temporary changes. For those who use both stashes and shelves, there’s an option to switch to a combined tab in <em>Settings/Preferences | Version Control | Git</em>.&nbsp;&nbsp;</li>
  1534.  
  1535.  
  1536.  
  1537. <li>In the diff viewer, you can now specify folders and files to be ignored during the comparison process in order to focus solely on relevant changes.&nbsp;</li>
  1538.  
  1539.  
  1540.  
  1541. <li>In the<em> Branches </em>popup, you can now filter search results by actions and repositories.</li>
  1542.  
  1543.  
  1544.  
  1545. <li>We’ve removed the <em>Git</em> tab from the <em>Search Everywhere</em> dialog by default. You can return it in <em>Settings / Preferences | Advanced Settings | Version Control. Git.</em></li>
  1546. </ul>
  1547.  
  1548.  
  1549.  
  1550. <h2 class="wp-block-heading">Build tools</h2>
  1551.  
  1552.  
  1553.  
  1554. <ul>
  1555. <li>IntelliJ IDEA now parses <code>pom.xml</code> files to construct project models swiftly, providing instant access to the project structure while the complete project model with all the dependencies is built in the background.</li>
  1556.  
  1557.  
  1558.  
  1559. <li>We&#8217;ve added long-awaited support for the Maven Shade Plugin’s renaming functionality.</li>
  1560.  
  1561.  
  1562.  
  1563. <li>The list of Maven repositories, along with their indexing statuses, is now displayed in the <em>Maven</em> tool window.</li>
  1564.  
  1565.  
  1566.  
  1567. <li>The quick documentation popup now provides an easy way to download source code. &nbsp;</li>
  1568. </ul>
  1569.  
  1570.  
  1571.  
  1572. <h2 class="wp-block-heading">Run/Debug</h2>
  1573.  
  1574.  
  1575.  
  1576. <ul>
  1577. <li>It is now possible to set inline breakpoints for multiple statements.</li>
  1578.  
  1579.  
  1580.  
  1581. <li>Library calls are folded by default in the <em>Debug </em>tool window’s call stack.</li>
  1582.  
  1583.  
  1584.  
  1585. <li>Code coverage settings are now placed in <em>Settings/Preferences | Build, Execution, Deployment | Coverage.&nbsp;</em></li>
  1586.  
  1587.  
  1588.  
  1589. <li>IntelliJ IDEA 2024.1 introduces conditional statement coverage capabilities. Now the IDE both shows which lines have uncovered conditions and specifies any conditional branches or variable values that are not covered.</li>
  1590.  
  1591.  
  1592.  
  1593. <li>The new version offers simplified importing for JaCoCo test coverage reports, with a direct link available right in the <em>Coverage</em> tool window.&nbsp;</li>
  1594. </ul>
  1595.  
  1596.  
  1597.  
  1598. <p></p>
  1599.  
  1600.  
  1601.  
  1602. <p><strong>The features and enhancements in version 2024.1 that are designed to facilitate work with frameworks, technologies, and databases, as well as the updates for web development, are accessible in IntelliJ IDEA Ultimate only.</strong></p>
  1603.  
  1604.  
  1605.  
  1606. <h2 class="wp-block-heading">Frameworks and technologies</h2>
  1607.  
  1608.  
  1609.  
  1610. <ul>
  1611. <li>In Spring projects, the IDE now offers autocompletion for all beans from the application context and automatically autowires them.&nbsp;</li>
  1612.  
  1613.  
  1614.  
  1615. <li>User experience with Spring diagrams has been improved, offering easy access via gutter icons or intention actions and better visualization of Spring stereotypes.</li>
  1616.  
  1617.  
  1618.  
  1619. <li>The <em>Search Everywhere</em> dialog now includes <em>Endpoints</em> tab, which appears in projects where URL search results are pertinent.&nbsp;</li>
  1620.  
  1621.  
  1622.  
  1623. <li>The HTTP Client in version 2024.1 expands authentication options, supports extra parameters for token and authentication requests, automates <code>code_challenge</code> generation and <code>code_verifier</code> passing. Upgraded to Netty, it now supports SSL, proxies, and HTTP/2. Its toolbar has been redesigned to match the IDE’s new UI.</li>
  1624.  
  1625.  
  1626.  
  1627. <li>We’ve introduced a new settings editor for Quarkus run configurations. For both Maven and Gradle projects, it offers easy access to popular settings like <em>Run profile</em> and <em>Environment variables</em>.</li>
  1628.  
  1629.  
  1630.  
  1631. <li>The Quarkus Dev UI is easily accessible via a new icon added to the <em>Run</em> tool window’s toolbar.&nbsp;</li>
  1632.  
  1633.  
  1634.  
  1635. <li>We’ve optimized the code behind JSON schema validation and completion. As a result, the IDE now handles these tasks faster and with reduced memory consumption.</li>
  1636.  
  1637.  
  1638.  
  1639. <li>HTTP headers are now easily completed in all common scenarios, such as with Spring WebClient and REST Assured tests.&nbsp;</li>
  1640.  
  1641.  
  1642.  
  1643. <li>IntelliJ IDEA Ultimate 2024.1 integrates support for <a href="https://docs.openrewrite.org/" target="_blank" rel="noopener">OpenRewrite</a>, expanding refactoring capabilities and providing you with a toolkit for improving code quality, consistency, and maintainability.</li>
  1644.  
  1645.  
  1646.  
  1647. <li>We’ve implemented <a href="https://wiremock.org/" target="_blank" rel="noopener">WireMock</a> support. It is provided via a plugin that you can install from inside the IDE or get from <a href="https://plugins.jetbrains.com/plugin/23695-wiremock/" target="_blank" rel="noopener">JetBrains Marketplace</a>.</li>
  1648.  
  1649.  
  1650.  
  1651. <li>IntelliJ IDEA Ultimate 2024.1 brings improved Terraform support that simplifies the process of creating, managing, and scaling your infrastructure. <a href="https://blog.jetbrains.com/idea/2024/03/intellij-idea-2024-1-beta/#enhanced-terraform-support">Learn more.</a></li>
  1652. </ul>
  1653.  
  1654.  
  1655.  
  1656. <h2 class="wp-block-heading">Database tools</h2>
  1657.  
  1658.  
  1659.  
  1660. <ul>
  1661. <li>The data editor now features a local filtering option.&nbsp;</li>
  1662.  
  1663.  
  1664.  
  1665. <li>We’ve implemented the ability to view single records in the data editor.</li>
  1666.  
  1667.  
  1668.  
  1669. <li>It’s now possible to rearrange columns in CSV files.&nbsp;</li>
  1670.  
  1671.  
  1672.  
  1673. <li>We&#8217;ve streamlined UUID management with a new <em>Generate UUID</em> action, an option to edit columns with UUIDs, and validation of UUID columns during editing for PostgreSQL users.</li>
  1674.  
  1675.  
  1676.  
  1677. <li>The new IDE version eliminates the need to manually select sessions, streamlining query execution.</li>
  1678.  
  1679.  
  1680.  
  1681. <li>You can now format multi-row <code>INSERT</code> statements so their values are aligned.</li>
  1682.  
  1683.  
  1684.  
  1685. <li>The IDE now analyzes the aggregates used in <code>SELECT</code> clauses and includes the appropriate column list in the <code>GROUP BY</code> clause suggestions.</li>
  1686.  
  1687.  
  1688.  
  1689. <li>The <em>Unsafe query</em> warning now alerts you if you run a query with the <code>WHERE TRUE</code> condition or one of its variations.&nbsp;</li>
  1690.  
  1691.  
  1692.  
  1693. <li>It’s now possible to specify which symbols you will use to accept code completion suggestions, allowing you to write SQL even faster.</li>
  1694.  
  1695.  
  1696.  
  1697. <li>External databases shared via data catalogs are now supported. Their content is introspected, and completion is available for them.</li>
  1698.  
  1699.  
  1700.  
  1701. <li>IntelliJ IDEA Ultimate 2024.1 supports commands from the four main Redis Stack modules: <em>RedisJSON, RediSearch, RedisBloom</em> and <em>RedisTimeSeries</em>.</li>
  1702.  
  1703.  
  1704.  
  1705. <li>JSON documents are now displayed in a dedicated folder. You can view their values in the data viewer, and you can specify their JSON paths.&nbsp;</li>
  1706. </ul>
  1707.  
  1708.  
  1709.  
  1710. <h2 class="wp-block-heading">Web development&nbsp;</h2>
  1711.  
  1712.  
  1713.  
  1714. <ul>
  1715. <li>We have significantly enhanced the quick documentation popup. It now supports syntax highlighting for code blocks.&nbsp;</li>
  1716.  
  1717.  
  1718.  
  1719. <li>IntelliJ IDEA Ultimate 2024.1 introduces several new quick-fixes for React that let you create props and states on the fly.&nbsp;</li>
  1720.  
  1721.  
  1722.  
  1723. <li>There’s a new <em>Language Services</em> widget on the status bar, providing insights into the active language services for the current file and project.</li>
  1724. </ul>
  1725.  
  1726.  
  1727.  
  1728. <p><br>These are the most notable new features included in the IntelliJ IDEA 2024.1 release. For a complete list of changes, refer to the <a href="https://youtrack.jetbrains.com/articles/IDEA-A-2100661899/IntelliJ-IDEA-2024.1-241.14494.240-build-Release-Notes" data-type="link" data-id="https://youtrack.jetbrains.com/articles/IDEA-A-2100661899/IntelliJ-IDEA-2024.1-241.14494.240-build-Release-Notes" target="_blank" rel="noopener">release notes</a>.</p>
  1729.  
  1730.  
  1731.  
  1732. <p>Your feedback is essential in our journey to refine IntelliJ IDEA. Share your thoughts and suggestions on the latest features by connecting with us on <a href="https://twitter.com/intellijidea" data-type="link" data-id="https://twitter.com/intellijidea" target="_blank" rel="noopener">X (formerly Twitter)</a> or leaving a comment below. If you encounter any bugs, please report them to our <a href="https://youtrack.jetbrains.com/issues/IDEA" data-type="link" data-id="https://youtrack.jetbrains.com/issues/IDEA" target="_blank" rel="noopener">issue tracker</a>.</p>
  1733.  
  1734.  
  1735.  
  1736. <p>Happy developing!</p>
  1737. ]]></content:encoded>
  1738. <media:content url="https://www.youtube.com/embed/FuvoOm4TIxE" medium="video" width="1280" height="720">
  1739. <media:player url="https://www.youtube.com/embed/FuvoOm4TIxE" />
  1740. <media:title type="plain">What&#039;s New in IntelliJ IDEA 2024.1</media:title>
  1741. <media:description type="html"><![CDATA[IntelliJ IDEA 2024.1 has been released with an array of exciting upgrades to help streamline your workflows.&nbsp;]]></media:description>
  1742. <media:thumbnail url="https://blog.jetbrains.com/wp-content/uploads/2024/03/IntelliJ-IDEA-2024.1.png" />
  1743. <media:rating scheme="urn:simple">nonadult</media:rating>
  1744. </media:content>
  1745. </item>
  1746. <item>
  1747. <title>Full Line Code Completion in JetBrains IDEs: All You Need to Know</title>
  1748. <link>https://blog.jetbrains.com/blog/2024/04/04/full-line-code-completion-in-jetbrains-ides-all-you-need-to-know/</link>
  1749. <dc:creator><![CDATA[Ekaterina Ryabukha]]></dc:creator>
  1750. <pubDate>Thu, 04 Apr 2024 09:40:01 +0000</pubDate>
  1751. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2024/03/FLCC-2024-1-Featured.png</featuredImage> <product ><![CDATA[go]]></product>
  1752. <product ><![CDATA[idea]]></product>
  1753. <product ><![CDATA[phpstorm]]></product>
  1754. <product ><![CDATA[pycharm]]></product>
  1755. <product ><![CDATA[ruby]]></product>
  1756. <product ><![CDATA[webstorm]]></product>
  1757. <category><![CDATA[news]]></category>
  1758. <category><![CDATA[ai]]></category>
  1759. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=blog&#038;p=458703</guid>
  1760.  
  1761. <description><![CDATA[Programming with AI is still a highly divisive topic, but there’s no denying that more and more developers are starting to incorporate AI into their daily workflows. Whether you’ve already picked your side in the debate or are still undecided, we’ve got a new feature in v2024.1 of JetBrains IDEs that might just pique your [&#8230;]]]></description>
  1762. <content:encoded><![CDATA[
  1763. <p>Programming with AI is still a highly divisive topic, but there’s no denying that more and more developers are starting to incorporate AI into their daily workflows. Whether you’ve already picked your side in the debate or are still undecided, we’ve got a new feature in v2024.1 of <a href="https://www.jetbrains.com/ides/" target="_blank" rel="noopener">JetBrains IDEs</a> that might just pique your interest – full line code completion. It’s <strong>AI-powered</strong> and runs <strong>locally without sending any data</strong> over the internet.</p>
  1764.  
  1765.  
  1766. <p><iframe loading="lazy" width="800" height="450" src="https://www.youtube.com/embed/DLBiJ5kYUFg?si=zAggulqKWyhAh9Fk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
  1767.  
  1768.  
  1769. <p>In this blog post, we’ll tell you more about what full line code completion is, how it works, what languages are supported, and how you can provide feedback about it to us.</p>
  1770.  
  1771.  
  1772.  
  1773. <h2 class="wp-block-heading">What is full line code completion in JetBrains IDEs?</h2>
  1774.  
  1775.  
  1776.  
  1777. <p>This new type of code completion was added to JetBrains IDEs with the latest 2024.1 update. As you can see below, it takes the form of gray-toned, single-line suggestions that complete lines based on the context of the current file:</p>
  1778.  
  1779.  
  1780.  
  1781. <figure class="wp-block-image size-full"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/FLCC-in-action.png" alt="tab-labels" data-gif-src="https://blog.jetbrains.com/wp-content/uploads/2024/03/FLCC-in-action.gif"></figure>
  1782.  
  1783.  
  1784.  
  1785. <p>These suggestions are powered by specialized language models that we’ve <a href="https://blog.jetbrains.com/blog/2024/04/04/full-line-code-completion-in-jetbrains-ides-all-you-need-to-know/#under-the-hood">trained specifically for different languages and frameworks</a>. The models run locally without sending any code over the internet.</p>
  1786.  
  1787.  
  1788.  
  1789. <p>Full line code complеtion is <strong>currently available for Java</strong>, <strong>Kotlin</strong>, <strong>Python</strong>, <strong>JavaScript</strong>, <strong>TypeScript</strong>, <strong>CSS</strong>, <strong>PHP</strong>, <strong>Go</strong>, and <strong>Ruby</strong> within the corresponding JetBrains IDEs: IntelliJ IDEA Ultimate, PyCharm Professional, WebStorm, PhpStorm, GoLand, and RubyMine. In the coming months, we plan to extend the functionality to C#, Rust, and C++, so it will also land in Rider, RustRover, and CLion.</p>
  1790.  
  1791.  
  1792.  
  1793. <p>Note that full line code completion is included with your active JetBrains IDE subscription at no additional cost – just make sure you’re on v2024.1 or later. If you don’t yet have a subscription, you can also use this feature during the 30-day free trial.</p>
  1794.  
  1795.  
  1796.  
  1797. <h2 class="wp-block-heading">How does full line completion work?</h2>
  1798.  
  1799.  
  1800.  
  1801. <p>With full line code completion, we had two main goals in mind. The first one is obvious – to help you save time and increase your coding speed. But beyond that, we also wanted to provide a solution that addresses the constraints certain organizations have when it comes to using AI solutions that are connected to the cloud.</p>
  1802.  
  1803.  
  1804.  
  1805. <p>Here’s a breakdown of how full line code completion helps to realize these two aims:</p>
  1806.  
  1807.  
  1808.  
  1809. <ul>
  1810. <li><strong>It works locally and is available offline</strong>. This means you can take advantage of the feature even if you aren’t connected to the internet.</li>
  1811.  
  1812.  
  1813.  
  1814. <li><strong>It doesn’t send any data from your machine over the internet</strong>. The language models that power full line code completion run locally, which is great for two reasons. First, your code remains safe, as it never leaves your machine. Second, there are no additional cloud-related expenses – that’s why this feature comes at no additional cost.</li>
  1815.  
  1816.  
  1817.  
  1818. <li><strong>It&#8217;s integrated deeply into JetBrains IDEs</strong>. All suggestions will be appropriately formatted, with the IDE checking for balanced brackets and quotes. Additionally, we use the power of static analysis and our understanding of code to filter out incorrect suggestions. Each supported language has its own set of suggested code correctness checks. The most basic ones, like unresolved reference checks, are implemented for most languages to guarantee that the IDE doesn&#8217;t suggest non-existent variables and methods. The auto-import feature is also supported.</li>
  1819.  
  1820.  
  1821.  
  1822. <li><strong>It’s designed to keep your workflow as smooth as possible</strong>. We use smart filtering to avoid showing suggestions that tend to be canceled explicitly or deleted right after they were added.</li>
  1823. </ul>
  1824.  
  1825.  
  1826.  
  1827. <p>For some additional technical details, see <a href="https://blog.jetbrains.com/blog/2024/04/04/full-line-code-completion-in-jetbrains-ides-all-you-need-to-know/#under-the-hood" data-type="link" data-id="https://blog.jetbrains.com/blog/2024/04/04/full-line-code-completion-in-jetbrains-ides-all-you-need-to-know/#under-the-hood">this section</a> below.</p>
  1828.  
  1829.  
  1830.  
  1831. <h2 class="wp-block-heading">Full line code completion vs. AI Assistant</h2>
  1832.  
  1833.  
  1834.  
  1835. <p>There are two ways you can benefit from AI functionality in JetBrains IDEs – full line code completion and <a href="https://www.jetbrains.com/ai/" target="_blank" rel="noopener">JetBrains AI Assistant</a>. We appreciate that this might be confusing, so let’s take a closer look at what they have in common and how they differ.</p>
  1836.  
  1837.  
  1838.  
  1839. <p>Both full line code completion and JetBrains AI Assistant aim to help you work faster. They both also go beyond the standard completion that has been available in JetBrains IDEs for some time already. However, JetBrains AI Assistant offers a more comprehensive feature set, including context-aware smart chat and the ability to generate tests or write documentation.</p>
  1840.  
  1841.  
  1842.  
  1843. <p>See the table below for a comparison of the two AI functionalities:</p>
  1844.  
  1845.  
  1846.  
  1847. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="1700" height="992" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/FLCC-2024-1-infographic.png" alt="" class="wp-image-460021"/></figure>
  1848.  
  1849.  
  1850.  
  1851. <p>Please rest assured that <strong>we never train any of our AI features on customers’ code</strong>. If your company has strict data privacy regulations, but you still want to speed up your workflows with AI, full line code completion may be a better choice for you.</p>
  1852.  
  1853.  
  1854.  
  1855. <h2 class="wp-block-heading">Under the hood</h2>
  1856.  
  1857.  
  1858.  
  1859. <p>The backbone of full line code completion is a programming-language specific language model, which is trained in house using a dataset of open-source code with permissive licenses. The language model’s input is the code before the caret, though for some languages, we also add content from related files. The output is the model’s suggested continuation of the current line, which is shown in gray.</p>
  1860.  
  1861.  
  1862.  
  1863. <p>The language model’s inference runs on your local machine. To ensure the most efficient generation, the model inference runs in a separate process and is heavily optimized for the target machine’s architecture. For example, if you’re using x86-64 architecture, the model will run on the CPU, whereas if you’re using ARM64 architecture, the model will use the power of your computer’s GPU.</p>
  1864.  
  1865.  
  1866.  
  1867. <p>After the suggestion is generated, a number of post-processing steps are applied. First, we check whether this suggestion is syntactically and semantically correct, and then we perform smart filtering, formatting, parenthesis balancing, and various other manipulations. Post-processing is crucial for user experience, so we do our best to show only valuable suggestions that don’t disturb your workflow.</p>
  1868.  
  1869.  
  1870.  
  1871. <p>Lastly, you may also be wondering <strong>why we decided to go for single-line suggestions</strong>. The length of the AI completion suggestions is a trade-off. While longer suggestions do tend to reduce how many keystrokes you have to make, which is good, they also increase the number of reviews required on your end. Taking the above into account, we decided that completing a single line of code would be a fair compromise.</p>
  1872.  
  1873.  
  1874.  
  1875. <p>This decision allowed us to reduce the size of the model without any significant decline in suggestion quality. In the 2024.1 version of JetBrains IDEs, we use a language model that has 100 million parameters, with a maximum context size of 1,536 tokens, which is roughly 170 lines of code.</p>
  1876.  
  1877.  
  1878.  
  1879. <h2 class="wp-block-heading">How to tweak the feature</h2>
  1880.  
  1881.  
  1882.  
  1883. <p>You can configure full line code completion in <em>Settings | Editor | General | Code Completion </em>– all the settings can be found there, under the <em>Machine Learning-Assisted Completion</em> section:</p>
  1884.  
  1885.  
  1886.  
  1887. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="1600" height="800" src="https://blog.jetbrains.com/wp-content/uploads/2024/04/FLCC-settings-in-WS.png" alt="" class="wp-image-459965"/></figure>
  1888.  
  1889.  
  1890.  
  1891. <p>If you’d like to turn off the feature, you can do so by unticking the <em>Enable Full Line suggestions</em> checkbox. Alternatively, you can disable the plugin powering this feature. To do so, go to <em>Settings | Plugins</em>, switch to the <em>Installed</em> tab, and look for <em>full line code completion</em>.</p>
  1892.  
  1893.  
  1894.  
  1895. <h2 class="wp-block-heading">How to provide feedback</h2>
  1896.  
  1897.  
  1898.  
  1899. <p>Full line code completion is still in active development, so we encourage you to share your feedback with us. You can do so by leaving a comment under this blog post. You can also upvote existing issues <a href="https://youtrack.jetbrains.com/issues/IDEA?q=Subsystem:%7BEditor.%20Code%20Completion.%20Full%20Line%7D" target="_blank" rel="noopener">here</a> or create a new one by logging in and clicking on the <em>New Issue</em> button in the top right-hand corner.</p>
  1900.  
  1901.  
  1902.  
  1903. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="1600" height="800" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/FLCC-reporting-issues.png" alt="" class="wp-image-459976"/></figure>
  1904.  
  1905.  
  1906.  
  1907. <p>That’s it for today. Please <strong>give full line code completion a try</strong> and let us know what you think. We’ll continue improving this functionality further, with support for C#, Rust, and C++ as well as better integration with AI Assistant’s multi-line code completion being our top priorities for now. Stay tuned for updates!</p>
  1908. ]]></content:encoded>
  1909. <media:content url="https://www.youtube.com/embed/DLBiJ5kYUFg" medium="video" width="1280" height="720">
  1910. <media:player url="https://www.youtube.com/embed/DLBiJ5kYUFg" />
  1911. <media:title type="plain">Local and Fast AI comes to your developer workflow - Full Line Code Completion</media:title>
  1912. <media:description type="html"><![CDATA[Dive into the blog post to learn more - https://jb.gg/flcc-blogJetBrains IDEs introduce a new feature that enables developers to autocomplete entire lines of...]]></media:description>
  1913. <media:thumbnail url="https://blog.jetbrains.com/wp-content/uploads/2024/03/FLCC-2024-1-Featured.png" />
  1914. <media:rating scheme="urn:simple">nonadult</media:rating>
  1915. </media:content>
  1916.                    <language>
  1917.                        <code><![CDATA[zh-hans]]></code>
  1918.                        <url>https://blog.jetbrains.com/zh-hans/blog/2024/04/04/full-line-code-completion-in-jetbrains-ides-all-you-need-to-know/</url>
  1919.                    </language>
  1920.                                    <language>
  1921.                        <code><![CDATA[pt-br]]></code>
  1922.                        <url>https://blog.jetbrains.com/pt-br/blog/2024/04/04/full-line-code-completion-in-jetbrains-ides-all-you-need-to-know/</url>
  1923.                    </language>
  1924.                                    <language>
  1925.                        <code><![CDATA[ko]]></code>
  1926.                        <url>https://blog.jetbrains.com/ko/blog/2024/04/04/full-line-code-completion-in-jetbrains-ides-all-you-need-to-know/</url>
  1927.                    </language>
  1928.                                    <language>
  1929.                        <code><![CDATA[ja]]></code>
  1930.                        <url>https://blog.jetbrains.com/ja/blog/2024/04/04/full-line-code-completion-in-jetbrains-ides-all-you-need-to-know/</url>
  1931.                    </language>
  1932.                                    <language>
  1933.                        <code><![CDATA[es]]></code>
  1934.                        <url>https://blog.jetbrains.com/es/blog/2024/04/04/full-line-code-completion-in-jetbrains-ides-all-you-need-to-know/</url>
  1935.                    </language>
  1936.                 </item>
  1937. <item>
  1938. <title>Java Annotated Monthly – April 2024</title>
  1939. <link>https://blog.jetbrains.com/idea/2024/04/java-annotated-monthly-april-2024/</link>
  1940. <dc:creator><![CDATA[Irina Mariasova]]></dc:creator>
  1941. <pubDate>Wed, 03 Apr 2024 08:33:19 +0000</pubDate>
  1942. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2024/04/java-annotated-featured_blog_1280x720.png</featuredImage> <category><![CDATA[idea]]></category>
  1943. <category><![CDATA[news]]></category>
  1944. <category><![CDATA[java]]></category>
  1945. <category><![CDATA[java-annotated]]></category>
  1946. <category><![CDATA[kotlin]]></category>
  1947. <category><![CDATA[spring]]></category>
  1948. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=461774</guid>
  1949.  
  1950. <description><![CDATA[Welcome to this month’s Java Annotated Monthly, where we’ll cover the most prominent updates, news, and releases in March. This edition is truly special because it introduces a new section – Featured content, where we invite influential people from the industry to share a personal selection of interesting articles or videos. Our first guest, Neha [&#8230;]]]></description>
  1951. <content:encoded><![CDATA[
  1952. <p>Welcome to this month’s Java Annotated Monthly, where we’ll cover the most prominent updates, news, and releases in March. This edition is truly special because it introduces a new section – Featured content, where we invite influential people from the industry to share a personal selection of interesting articles or videos.</p>
  1953.  
  1954.  
  1955.  
  1956. <p>Our first guest, <a href="https://linktr.ee/nehasardana" target="_blank" rel="noopener">Neha Sardana</a>, boasts over 15 years of experience in Java development. She&#8217;s a VP at Morgan Stanley and leads several Java User Groups, including Garden State JUG and NYJavaSig. Neha has a decade of experience in finance in Europe and the US, loves technology, and is keen on open-source projects.</p>
  1957.  
  1958.  
  1959.  
  1960. <p>Let’s begin!</p>
  1961.  
  1962.  
  1963.  
  1964. <h2 class="wp-block-heading">Featured content&nbsp;</h2>
  1965.  
  1966.  
  1967.  
  1968. <p>I would like to extend my deepest gratitude to JetBrains, especially to Helen Scott, Rachel Appel, and Marit van Dijk, for the invaluable opportunity to share my insights and enthusiasm for Java through this newsletter. Having dedicated over 15 years to the Java language, I can assert that it continually unveils a universe of expanding possibilities. In this edition, I am thrilled to discuss the latest advancements in Java as of this month.</p>
  1969.  
  1970.  
  1971.  
  1972. <p>Java 22 has been officially released as the non-LTS (long-term support) version by Oracle. Launched in March 2024, it introduces enhancements in three distinct categories of JEPs (JDK Enhancement Proposals):</p>
  1973.  
  1974.  
  1975.  
  1976. <ul>
  1977. <li>Language and Tooling
  1978. <ul>
  1979. <li>463: <a href="https://openjdk.org/jeps/463" target="_blank" rel="noopener">Implicitly Declared Classes and Instance Main Methods (Second Preview)</a> → <strong>Project Amber</strong></li>
  1980.  
  1981.  
  1982.  
  1983. <li>447: <a href="https://openjdk.org/jeps/447" target="_blank" rel="noopener">Statements before super(&#8230;) (Preview)</a> → <strong>Project Amber</strong></li>
  1984.  
  1985.  
  1986.  
  1987. <li>456: <a href="https://openjdk.org/jeps/456" target="_blank" rel="noopener">Unnamed Variables &amp; Patterns</a> → <strong>Project Amber</strong></li>
  1988.  
  1989.  
  1990.  
  1991. <li>459: <a href="https://openjdk.org/jeps/459" target="_blank" rel="noopener">String Templates (Second Preview)</a> → <strong>Project Amber</strong></li>
  1992.  
  1993.  
  1994.  
  1995. <li>458: <a href="https://openjdk.org/jeps/458" target="_blank" rel="noopener">Launch Multi-File Source-Code Programs</a></li>
  1996.  
  1997.  
  1998.  
  1999. <li>461: <a href="https://openjdk.org/jeps/461" target="_blank" rel="noopener">Stream Gatherers (Preview)</a></li>
  2000. </ul>
  2001. </li>
  2002.  
  2003.  
  2004.  
  2005. <li>Performance and Runtime
  2006. <ul>
  2007. <li>423: <a href="https://openjdk.org/jeps/423" target="_blank" rel="noopener">Region Pinning for G1</a>&nbsp;</li>
  2008. </ul>
  2009. </li>
  2010.  
  2011.  
  2012.  
  2013. <li>Libraries
  2014. <ul>
  2015. <li>454: <a href="https://openjdk.org/jeps/454" target="_blank" rel="noopener">Foreign Function &amp; Memory API</a> → <strong>Project Panama</strong></li>
  2016.  
  2017.  
  2018.  
  2019. <li>460: <a href="https://openjdk.org/jeps/460" target="_blank" rel="noopener">Vector API (Seventh Incubator)</a> → <strong>Project Panama</strong></li>
  2020.  
  2021.  
  2022.  
  2023. <li>457: <a href="https://openjdk.org/jeps/457" target="_blank" rel="noopener">Class-File API (Preview)</a></li>
  2024.  
  2025.  
  2026.  
  2027. <li>462: <a href="https://openjdk.org/jeps/462" target="_blank" rel="noopener">Structured Concurrency (Second Preview)</a> → <strong>Project Loom</strong></li>
  2028.  
  2029.  
  2030.  
  2031. <li>464: <a href="https://openjdk.org/jeps/464" target="_blank" rel="noopener">Scoped Values (Second Preview)</a> → <strong>Project Loom</strong></li>
  2032. </ul>
  2033. </li>
  2034. </ul>
  2035.  
  2036.  
  2037.  
  2038. <p>These updates stand out for their significant contributions to enhancing developer productivity daily. For those interested in tracing the evolution from Java 12 to Java 22, I encourage you to explore the detailed analysis I published on my blog: <a href="https://medium.com/@neha-sardana/exploring-project-ambers-key-enhancements-from-java-12-to-java-22-0b290def4f9e" target="_blank" rel="noopener"><em>Exploring Project Amber&#8217;s Key Enhancements from Java 12 to Java 22</em></a>. Additionally, Mala Gupta has elucidated many new features of Java 22 in her post on the IntelliJ IDEA blog, which can be found <a href="https://blog.jetbrains.com/idea/2024/03/java-22-and-intellij-idea/">here</a>.</p>
  2039.  
  2040.  
  2041.  
  2042. <p>Summarizing the impact of Project Amber, Loom, and Panama:</p>
  2043.  
  2044.  
  2045.  
  2046. <ul>
  2047. <li><strong>Project Amber</strong> continues to refine the Java language, enhancing its syntax and reducing boilerplate, thereby making Java more expressive and easier to work with. The focus on improving language features, as evidenced by the enhancements in Java 22, significantly bolsters developer efficiency and code readability. More information on Project Amber is available on the official OpenJDK website: <a href="https://openjdk.org/projects/amber/" target="_blank" rel="noopener">OpenJDK Project Amber</a>.</li>
  2048.  
  2049.  
  2050.  
  2051. <li><strong>Project Loom</strong> introduces a revolutionary approach to concurrency in Java. By adding lightweight threads or fibers, Project Loom aims to simplify concurrent programming, making it more scalable and easier to manage, thereby addressing one of the longstanding challenges in Java development.</li>
  2052.  
  2053.  
  2054.  
  2055. <li><strong>Project Panama</strong> seeks to bridge the gap between Java and native code, facilitating easier and more efficient calls to and from native libraries. This project aims to enhance the overall performance of Java applications, making it a pivotal advancement for developers working with native libraries.<br></li>
  2056. </ul>
  2057.  
  2058.  
  2059.  
  2060. <p>Exploring these projects offers a glimpse into the future of Java, highlighting the language&#8217;s ongoing evolution and its commitment to improving developer productivity and application performance. For a deeper dive into Project Loom and Project Panama and to understand their significance, I recommend visiting <a href="https://blogs.oracle.com/java/post/the-arrival-of-java-22" target="_blank" rel="noopener">Oracle&#8217;s blog on Java 22</a>.<br></p>
  2061.  
  2062.  
  2063.  
  2064. <p>While Java 22 is not an LTS version from Oracle, it is important to learn about the new features and especially try out the preview features to become more accustomed to them if you are planning to adopt them in future LTS versions.<br></p>
  2065.  
  2066.  
  2067.  
  2068. <p>Finally, I am thrilled that it was announced at the <a href="https://www.youtube.com/live/AjjAZsnRXtE?si=xwMpRO1hT6SNI0wZ" target="_blank" rel="noopener">Java 22 Launch Party</a> that JavaOne is making a comeback in March 2025! For updates and more information, please visit <a href="https://javaone.com/" target="_blank" rel="noopener">JavaOne</a>.</p>
  2069.  
  2070.  
  2071.  
  2072. <h2 class="wp-block-heading">Java News</h2>
  2073.  
  2074.  
  2075.  
  2076. <p>Java News Roundup <a href="https://www.infoq.com/news/2024/03/java-news-roundup-feb26-2024/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">1</a>, <a href="https://www.infoq.com/news/2024/03/java-news-roundup-mar04-2024/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">2</a>, <a href="https://www.infoq.com/news/2024/03/java-news-roundup-mar18-2024/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">3</a>, <a href="https://www.infoq.com/news/2024/03/java-news-roundup-mar18-2024/" target="_blank" rel="noopener">4</a> – Catch every update in the world of Java.&nbsp;</p>
  2077.  
  2078.  
  2079.  
  2080. <p>Here’s our selection of the most prominent Java 22 announcements for you:&nbsp;</p>
  2081.  
  2082.  
  2083.  
  2084. <ul>
  2085. <li><a href="https://inside.java/2024/03/14/newscast-65/" target="_blank" rel="noopener">JDK 22 Release Notes Review &#8211; Inside Java Newscast #65</a> by <a href="https://inside.java/u/BillyKorando" target="_blank" rel="noopener">Billy Korando</a></li>
  2086.  
  2087.  
  2088.  
  2089. <li><a href="https://inside.java/2024/03/19/the-arrival-of-java-22/" target="_blank" rel="noopener">The Arrival of Java 22!</a> By <a href="https://inside.java/u/SharatChander" target="_blank" rel="noopener">Sharat Chander</a></li>
  2090.  
  2091.  
  2092.  
  2093. <li><a href="https://inside.java/2024/03/21/sip095/" target="_blank" rel="noopener">JDK 22 in Two Minutes! &#8211; Sip of Java</a> by <a href="https://inside.java/u/BillyKorando" target="_blank" rel="noopener">Billy Korando</a></li>
  2094.  
  2095.  
  2096.  
  2097. <li><a href="https://inside.java/2024/03/25/prunning-dead-exceptions-handlers/" target="_blank" rel="noopener">Pruning dead exception handlers</a> by <a href="https://jornvernee.github.io/" target="_blank" rel="noopener">Jorn Vernee</a></li>
  2098.  
  2099.  
  2100.  
  2101. <li><a href="https://blog.jetbrains.com/idea/2024/03/java-22-and-intellij-idea/">Java 22 and IntelliJ IDEA</a></li>
  2102.  
  2103.  
  2104.  
  2105. <li><a href="https://foojay.io/today/java-22-is-here-and-its-ready-to-rock/" target="_blank" rel="noopener">Java 22 Is Here, And It’s Ready To Rock</a> by <a href="https://foojay.io/today/author/hanno-embregts/" target="_blank" rel="noopener">Hanno Embregts</a></li>
  2106.  
  2107.  
  2108.  
  2109. <li><a href="https://foojay.io/today/java-22-whats-new/" target="_blank" rel="noopener">Java 22: What’s New?</a> by <a href="https://foojay.io/today/author/loic-mathieu/" target="_blank" rel="noopener">Loic Mathieu</a></li>
  2110.  
  2111.  
  2112.  
  2113. <li><a href="https://foojay.io/today/welcome-to-java-22/" target="_blank" rel="noopener">Foojay Podcast #45: Welcome to Java 22</a> with <a href="https://foojay.io/today/author/frankdelporte/" target="_blank" rel="noopener">Frank Delporte</a>, <a href="https://foojay.io/today/author/loic-mathieu/" target="_blank" rel="noopener">Loic Mathieu</a>, <a href="https://foojay.io/today/author/simonritter/" target="_blank" rel="noopener">Simon Ritter</a></li>
  2114.  
  2115.  
  2116.  
  2117. <li><a href="https://medium.com/graalvm/welcome-graalvm-for-jdk-22-8a48849f054c" target="_blank" rel="noopener">Welcome, GraalVM for JDK 22!</a> by <a href="https://medium.com/@alina.yurenko?source=post_page-----8a48849f054c--------------------------------" target="_blank" rel="noopener">Alina Yurenko</a></li>
  2118.  
  2119.  
  2120.  
  2121. <li><a href="https://inside.java/2024/03/20/jdk22-security-enhancements/" target="_blank" rel="noopener">JDK 22 Security Enhancements</a> by <a href="https://seanjmullan.org/" target="_blank" rel="noopener">Sean Mullan</a></li>
  2122. </ul>
  2123.  
  2124.  
  2125.  
  2126. <h2 class="wp-block-heading">Java Tutorials and Tips</h2>
  2127.  
  2128.  
  2129.  
  2130. <p>Check out the Java-unconfusing series, where <a href="https://medium.com/@nataliiadziubenko?source=post_page-----d9ba389fed72--------------------------------" target="_blank" rel="noopener">Nataliia Dziubenko</a> explores Java topics that appear simple but can lead to surprising outcomes. It&#8217;s useful to learn about these cases and understand how they work:</p>
  2131.  
  2132.  
  2133.  
  2134. <ul>
  2135. <li><a href="https://nataliiadziubenko.com/2024/03/16/I-wont-let-Java-confuse-you-1.html" target="_blank" rel="noopener">I won’t let Java confuse you #1: String concatenation operator +</a></li>
  2136.  
  2137.  
  2138.  
  2139. <li><a href="https://nataliiadziubenko.com/2024/03/25/I-wont-let-Java-confuse-you-2.html" target="_blank" rel="noopener">I won’t let Java confuse you #2: expressions</a></li>
  2140. </ul>
  2141.  
  2142.  
  2143.  
  2144. <p><a href="https://inside.java/2024/03/03/jfokus-jdk-security-changes/" target="_blank" rel="noopener">Java 17 to 21: A Showcase of JDK Security Enhancements</a> – This session provides a full guide on how JDK&#8217;s security has improved since JDK17. You&#8217;ll learn about the latest in encryption, updates to the APIs, how to set up JDK security, and how Java Flight Recorder can help.&nbsp;</p>
  2145.  
  2146.  
  2147.  
  2148. <p><a href="https://inside.java/2024/03/09/jfokus-modern-java-action/" target="_blank" rel="noopener">Modern Java in Action</a> – <a href="https://inside.java/u/NicolaiParlog" target="_blank" rel="noopener">Nicolai Parlog</a> demonstrates how he is writing a GitHub Crawler and how the Java 21 features help him with this task.</p>
  2149.  
  2150.  
  2151.  
  2152. <p><a href="https://www.youtube.com/watch?v=53ccfLqYpWY" target="_blank" rel="noopener">IntelliJ Tips &amp; Tricks, Voxxed Days Zurich</a> – This session dives into IntelliJ IDEA&#8217;s hidden gems, showing you how to boost productivity with features like shortcuts, fast navigation, code completion, live templates, and more, including the debugger and AI assistant. Discover how to make the most of your IDE and streamline your coding process.</p>
  2153.  
  2154.  
  2155.  
  2156. <p><a href="https://foojay.io/today/increase-readability-and-reduce-complexity-with-javas-pattern-matching/" target="_blank" rel="noopener">Increase readability and reduce complexity with Java’s Pattern Matching</a> – <a href="https://foojay.io/today/author/jonathan-vila/" target="_blank" rel="noopener">Jonathan Vila</a> shows different ways of checking the type of an object and keeping the code easy to understand while also reducing the chances of introducing hard-to-spot bugs.</p>
  2157.  
  2158.  
  2159.  
  2160. <p><a href="https://foojay.io/today/builders-withers-and-records-javas-path-to-immutability/" target="_blank" rel="noopener">Builders, Withers, and Records: Java’s path to immutability</a> – Immutable objects are simpler to use, safer, and great for multi-threading. This article explains how to create such objects in Java using Builders and Withers, and also introduces Records.</p>
  2161.  
  2162.  
  2163.  
  2164. <p><a href="https://inside.java/2024/02/29/newscast-64/" target="_blank" rel="noopener">(Dirty?) Tricks in Java 22 – Inside Java Newscast #64</a> – Nikolay Parlog shows pattern matching with Optional, how to expand a sealed type hierarchy, when nested switches are useful, and the pros and cons of a reverse instanceof check.</p>
  2165.  
  2166.  
  2167.  
  2168. <p><a href="https://foojay.io/today/tips-for-reading-code/" target="_blank" rel="noopener">Tips for reading code</a> – <a href="https://maritvandijk.com/" target="_blank" rel="noopener">Marit van Dijk</a> shares some valuable advice on reading code inside the IDE.</p>
  2169.  
  2170.  
  2171.  
  2172. <p><a href="https://jameshamilton.eu/programming/jep-457-hello-world-translator" target="_blank" rel="noopener">JEP 457 Hello World Translator</a> – This article shows how to use the <a href="https://openjdk.org/jeps/457" target="_blank" rel="noopener">JEP 457 Java Class-File API</a> to write a simple program that changes &#8220;Hello World&#8221; to a different language, like &#8220;Hallo Wereld&#8221;, with just a few lines of code.</p>
  2173.  
  2174.  
  2175.  
  2176. <h2 class="wp-block-heading">Kotlin Corner</h2>
  2177.  
  2178.  
  2179.  
  2180. <p><a href="https://blog.jetbrains.com/kotlin/2024/03/the-ktor-roadmap-for-2024/">The Ktor Roadmap for 2024</a> – Find out what new features and improvements are planned for 2024.</p>
  2181.  
  2182.  
  2183.  
  2184. <p><a href="https://blog.jetbrains.com/kotlin/2024/03/kotlin-roundup-feb-march-24/">Kotlin Roundup: Unveiling the New Compose Multiplatform Release, Amper Update, and More!</a> – In this roundup, you can explore the highlights of the latest developments in the Kotlin ecosystem.</p>
  2185.  
  2186.  
  2187.  
  2188. <p><a href="https://zsmb.co/building-a-macos-screen-saver-in-kotlin/" target="_blank" rel="noopener">Building a macOS screen saver in Kotlin</a> – This article describes <a href="https://zsmb.co/authors/zsmb13/" target="_blank" rel="noopener">Márton Braun&#8217;s</a> journey in designing a custom macOS screensaver, primarily using Kotlin and the powers of <a href="https://www.jetbrains.com/kotlin-multiplatform/" target="_blank" rel="noopener">Kotlin Multiplatform</a> to target macOS.</p>
  2189.  
  2190.  
  2191.  
  2192. <p><a href="https://typealias.com/start/kotlin-exceptions/" target="_blank" rel="noopener">Handling Runtime Exceptions</a> – Learn to handle different types of exceptions in Kotlin.</p>
  2193.  
  2194.  
  2195.  
  2196. <p><a href="https://proandroiddev.com/seven-recipes-to-understand-flows-and-asynchrony-in-kotlin-1bd7fe041480" target="_blank" rel="noopener">Seven recipes to understand flows and asynchrony in Kotlin </a>– This article explores asynchrony and focuses on flows, explaining their purpose, the difference between hot and cold flows, and how to convert callbacks into suspend functions and flows.</p>
  2197.  
  2198.  
  2199.  
  2200. <p><a href="https://www.youtube.com/watch?v=I5vjCHIq5xs" target="_blank" rel="noopener">AI Assistant vs Property-based Tests </a>– Check out how <a href="https://www.youtube.com/@RefactoringDuncan" target="_blank" rel="noopener">Duncan McGregor</a> tried using AI to create tests, but it wasn&#8217;t perfect. So, he mixed it with <a href="https://jqwik.net/" target="_blank" rel="noopener">jqwik</a> for property-based testing. This combo made testing easier and more reliable while also reducing his workload.</p>
  2201.  
  2202.  
  2203.  
  2204. <p><a href="https://www.youtube.com/watch?v=Yz0xBaFt50s" target="_blank" rel="noopener">Type Projections&#8230; and why they work! </a>– <a href="https://www.youtube.com/@typealias" target="_blank" rel="noopener">Dave Leeds</a> invites you to the world of Kotlin&#8217;s type projections! This video shows how you can use type projections to get generic subtyping – even for types that are in library code. In less than nine minutes, you&#8217;ll learn both how you can use them and why they work.</p>
  2205.  
  2206.  
  2207.  
  2208. <p><a href="https://www.youtube.com/watch?v=6moaoAJui_4" target="_blank" rel="noopener">Variance&#8230; without Generics!</a> – Did you know you can apply the concepts of covariance and contravariance in Kotlin even outside of generics? Read this video to learn more about this.</p>
  2209.  
  2210.  
  2211.  
  2212. <p><a href="https://www.youtube.com/playlist?list=PLmtsMNDRU0BwGCBDIKKQNLYycRTnQzMfp" target="_blank" rel="noopener">A full Kotlin Tutorial by Rock The JVM – Kotlin at Light Speed</a> – Have a look at a jam-packed mini-course that will give you a solid grounding in the Kotlin programming language.</p>
  2213.  
  2214.  
  2215.  
  2216. <p><a href="https://typealias.com/start/kotlin-generics/" target="_blank" rel="noopener">Generics</a> – The article explains Kotlin generics in a practical way, using a bakery café as an example.</p>
  2217.  
  2218.  
  2219.  
  2220. <p><a href="https://medium.com/adevinta-tech-blog/testing-mastery-fast-and-secure-application-tests-fd633c5ccb2e" target="_blank" rel="noopener">Testing Mastery: Fast and Secure Application Tests</a> – The article offers tips on how to do application tests quickly and safely, with Kotlin-based examples.</p>
  2221.  
  2222.  
  2223.  
  2224. <h2 class="wp-block-heading">Languages, Frameworks, Libraries, and Technologies</h2>
  2225.  
  2226.  
  2227.  
  2228. <p>This Week in Spring <a href="https://spring.io/blog/2024/03/05/this-week-in-spring-march-5th-2024" target="_blank" rel="noopener">1</a>, <a href="https://spring.io/blog/2024/03/13/this-week-in-spring-march-12th-2024" target="_blank" rel="noopener">2</a>, <a href="https://spring.io/blog/2024/03/26/this-week-in-spring-march-26th-2024" target="_blank" rel="noopener">3</a>, <a href="https://spring.io/blog/2024/03/26/this-week-in-spring-march-26th-2024" target="_blank" rel="noopener">4</a> – Get to know all the latest from the world of Spring over the past month.</p>
  2229.  
  2230.  
  2231.  
  2232. <p><a href="https://spring.io/blog/2024/03/05/the-state-of-spring-survey-is-back" target="_blank" rel="noopener">The State of Spring Survey Is Back!</a> – We welcome your feedback!</p>
  2233.  
  2234.  
  2235.  
  2236. <p><a href="https://foojay.io/today/spring-internals-of-restclient/" target="_blank" rel="noopener">Spring: Internals of RestClient</a> – This article explains how Spring&#8217;s RestClient works, focusing on its structure and how it helps in building RESTful services.</p>
  2237.  
  2238.  
  2239.  
  2240. <p><a href="https://spring.io/blog/2024/03/04/spring-releases-for-february-2024" target="_blank" rel="noopener">Spring Releases for February 2024</a> – Here is the list of all the Spring projects that have been released this February.</p>
  2241.  
  2242.  
  2243.  
  2244. <p><a href="https://www.sourcelabs.nl/2024/02/29/securing-your-spring-apps-with-oauth-2-0-part-1/" target="_blank" rel="noopener">Securing your Spring Apps with OAuth 2.0 – Part 1</a> – The article explains how to protect Spring applications with OAuth 2.0, using Keycloak for managing user logins and securing apps with tokens.</p>
  2245.  
  2246.  
  2247.  
  2248. <p><a href="https://foojay.io/today/how-to-improve-your-spring-boot-skills/" target="_blank" rel="noopener">The “Spring Way” of Doing Things: 9 Ways to Improve Your Spring Boot Skills</a> – <a href="https://foojay.io/today/author/lee-sheinberg/" target="_blank" rel="noopener">Lee Sheinberg </a>shares some practical tips, best practices, and resources for a deeper understanding of Spring Boot.</p>
  2249.  
  2250.  
  2251.  
  2252. <p><a href="https://tech.asimio.net/2024/02/28/Cosmos-DB-Spring-Boot-2-Integration-Tests-Testcontainers.html" target="_blank" rel="noopener">Writing integration tests with Testcontainers and Cosmos DB Docker emulator for Spring Boot applications</a> – This blog post guides you through the process of creating integration tests for Spring Boot applications using Testcontainers and the Cosmos DB Docker emulator. It covers how to use dynamic ports instead of fixed ones and how to add the Cosmos DB emulator&#8217;s certificate to a temporal Java TrustStore that your tests can use.</p>
  2253.  
  2254.  
  2255.  
  2256. <p><a href="https://foojay.io/today/hello-ebpf-first-steps-with-libbpf-5/" target="_blank" rel="noopener">Hello eBPF: First steps with libbpf (5)</a> – <a href="https://foojay.io/today/author/johannes-bechberger/" target="_blank" rel="noopener">Johannes Bechberger</a> explains the advantages of switching from libbcc to the more recent libbpf.</p>
  2257.  
  2258.  
  2259.  
  2260. <p><a href="https://www.youtube.com/watch?v=ULFnBwnTZ9E" target="_blank" rel="noopener">OpenRewrite plugin on IntelliJ</a> – IntelliJ IDEA now supports OpenRewrite. See how it works in this video.</p>
  2261.  
  2262.  
  2263.  
  2264. <p><a href="https://donraab.medium.com/visualizing-eclipse-collections-after-twenty-years-of-development-701047fdc672" target="_blank" rel="noopener">Visualizing Eclipse Collections after Twenty Years of Development</a> – In this article, <a href="https://donraab.medium.com/?source=post_page-----701047fdc672--------------------------------" target="_blank" rel="noopener">Donald Raab</a> looks back at Eclipse Collections’ 20-year history, using visuals to show how the framework has developed to become instrumental in Java programming.</p>
  2265.  
  2266.  
  2267.  
  2268. <p><a href="https://www.infoq.com/presentations/rust-javascript/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Presentation: JavaScript: Empowered by Rust</a> – <a href="https://twitter.com/chrisbiscardi?lang=en" target="_blank" rel="noopener">Chris Biscardi</a> explores what Rust is being used for on the frontend and introduces the language from the perspective of a JavaScript developer.</p>
  2269.  
  2270.  
  2271.  
  2272. <p><a href="https://flounder.dev/posts/localize-apps-with-ai/" target="_blank" rel="noopener">Localize applications with AI</a> – <a href="https://twitter.com/flounder4130" target="_blank" rel="noopener">Igor Kulakov</a> takes us through the entire localization process with the help of AI tools using Spring Petclinic as a case study.&nbsp;</p>
  2273.  
  2274.  
  2275.  
  2276. <p><a href="https://www.infoq.com/articles/testing-machine-learning-simulators/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Testing Machine Learning: Insight and Experience from Using Simulators to Test Trained Functionality</a> – Explaining decisions made by AI models, especially those trained on complex data, can be challenging due to their intricate internal structures. So, how do you test them? Get some insights from this article.</p>
  2277.  
  2278.  
  2279.  
  2280. <p><a href="https://www.infoq.com/articles/managed-relational-databases-costs/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">The Hidden Cost of Using Managed Databases</a> – The article explains the hidden costs of using managed database services, highlighting that users should be aware of extra charges like data transfer fees.</p>
  2281.  
  2282.  
  2283.  
  2284. <p><a href="https://foojay.io/today/microservices-design-principles-for-well-crafted-architecture/" target="_blank" rel="noopener">Microservices Design Principles for Well-Crafted Architecture</a> – This article focuses on the fundamentals of microservice architecture and Object-Oriented Programming, specifically addressing how services interact (coupling) and how they&#8217;re organized (cohesion).</p>
  2285.  
  2286.  
  2287.  
  2288. <p><a href="https://vladmihalcea.com/postgresql-index-types/" target="_blank" rel="noopener">PostgreSQL Index Types</a> – In this article, <a href="https://vladmihalcea.com/" target="_blank" rel="noopener">Vlad Mihalcea</a> explores the different types of indexes in PostgreSQL and guides you through the process of selecting the most suitable index type for various scenarios.</p>
  2289.  
  2290.  
  2291.  
  2292. <p><a href="https://www.infoq.com/presentations/platforms-social-engineering/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Understanding Platforms: What They Are, Why They Work, When to Use Them, How to Build Them</a> – <a href="https://www.linkedin.com/in/hazelweakly/" target="_blank" rel="noopener">Hazel Weakly</a> discusses platforms and platform engineering. She explains what it means to learn, and how collective thought scales across teams, organizations, and industries.</p>
  2293.  
  2294.  
  2295.  
  2296. <p><a href="https://dzone.com/articles/debugging-streams-with-peek" target="_blank" rel="noopener">Debugging Streams With Peek</a> – Read this article by <a href="https://dzone.com/authors/sa74997" target="_blank" rel="noopener">Shai Almog</a> to learn how to debug Java streams effectively using the peek()method with practical examples and tips for optimizing your code.</p>
  2297.  
  2298.  
  2299.  
  2300. <p><a href="https://netflixtechblog.com/bending-pause-times-to-your-will-with-generational-zgc-256629c9386b" target="_blank" rel="noopener">Bending pause times to your will with Generational ZGC</a> – This article describes Netflix&#8217;s use of the Generational Z Garbage Collector to make Java applications run better with minimal interruptions.</p>
  2301.  
  2302.  
  2303.  
  2304. <p><a href="https://www.infoq.com/podcasts/state-of-agile-2024/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Podcast: The State of Agile in 2024</a> – Is Agile still valid in 2024? Find out together with <a href="https://www.infoq.com/profile/Joyce-Tompsett/" target="_blank" rel="noopener">Joyce Tompsett</a> and <a href="https://www.infoq.com/profile/Shane-Hastie/" target="_blank" rel="noopener">Shane Hastie.</a></p>
  2305.  
  2306.  
  2307.  
  2308. <p><a href="https://mydeveloperplanet.com/2024/03/06/implement-rag-using-weaviate-langchain4j-and-localai/" target="_blank" rel="noopener">Implement RAG Using Weaviate, LangChain4j, and LocalAI</a> – In this blog, you will learn how to implement Retrieval Augmented Generation (RAG) using Weaviate, LangChain4j, and LocalAI. This implementation allows you to ask questions about your documents using natural language.</p>
  2309.  
  2310.  
  2311.  
  2312. <h2 class="wp-block-heading">Conferences and Events</h2>
  2313.  
  2314.  
  2315.  
  2316. <p><a href="https://www.oracle.com/in/developer/devlive/bengaluru/java/" target="_blank" rel="noopener">Java Day Bengaluru</a> – Bangalore, India, April 3</p>
  2317.  
  2318.  
  2319.  
  2320. <p><a href="https://jdevsummitil.com/" target="_blank" rel="noopener">JDevSummit IL</a> – Tel Aviv, Israel, April 4</p>
  2321.  
  2322.  
  2323.  
  2324. <p><a href="https://qconlondon.com/" target="_blank" rel="noopener">Qcon London</a> – London, United Kingdom, April 8–10</p>
  2325.  
  2326.  
  2327.  
  2328. <p><a href="https://www.javaland.eu/en/home/" target="_blank" rel="noopener">JavaLand</a> – Nürburgring, Germany, April 9–11</p>
  2329.  
  2330.  
  2331.  
  2332. <p><a href="https://devnexus.com/" target="_blank" rel="noopener">DevNexus</a> – Atlanta, USA, April 9–11. Come visit the IntelliJ IDEA booth! </p>
  2333.  
  2334.  
  2335.  
  2336. <p><a href="https://www.devoxx.fr/" target="_blank" rel="noopener">Devoxx France</a> – Paris, France, April 17–19</p>
  2337.  
  2338.  
  2339.  
  2340. <p><a href="https://devoxx.gr/" target="_blank" rel="noopener">Devoxx Greece</a> – Athens, Greece, April 18–20</p>
  2341.  
  2342.  
  2343.  
  2344. <p><a href="https://info.jetbrains.com/idea-livestream-april24-2024.html" target="_blank" rel="noreferrer noopener">Java 22 and IntelliJ IDEA</a> – Online, April 24</p>
  2345.  
  2346.  
  2347.  
  2348. <p><a href="https://jax.de/mainz/" target="_blank" rel="noopener">JAX Hybrid</a> – Mainz, Germany, April 22–26</p>
  2349.  
  2350.  
  2351.  
  2352. <p><a href="https://developersummit.com/" target="_blank" rel="noopener">Great International Developers Conference</a> – Bangalore, India, April 23–26</p>
  2353.  
  2354.  
  2355.  
  2356. <p><a href="https://www.jug.ch/html/events/2024/spring_security_zh.html" target="_blank" rel="noopener">Spring Security</a> – Zurich, Switzerland, April 25</p>
  2357.  
  2358.  
  2359.  
  2360. <h2 class="wp-block-heading">Culture and Community</h2>
  2361.  
  2362.  
  2363.  
  2364. <p><a href="https://martinfowler.com/articles/measuring-developer-productivity-humans.html" target="_blank" rel="noopener">Measuring Developer Productivity via Humans</a> – In this article, <a href="https://www.linkedin.com/in/abinoda/" target="_blank" rel="noopener">Abi Noda</a> and <a href="https://www.linkedin.com/in/timcochran/" target="_blank" rel="noopener">Tim Cochran</a> introduce a promising approach of qualitative metrics that draw insights directly from developers&#8217; experiences. This human-centered data gives a more comprehensive view of productivity, suggesting that organizations should focus on human insights over system-generated data.</p>
  2365.  
  2366.  
  2367.  
  2368. <p><a href="https://www.infoq.com/presentations/lessons-opportunities-carrier/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Presentation: You Can Go Your Own Way: Navigating Your Own Career Path</a> – <a href="https://www.linkedin.com/in/erinschnabel/" target="_blank" rel="noopener">Erin Schnabel </a>shares what she learned in the course of her journey towards becoming a distinguished engineer, sharing insights and ideas that can be used to find and shape opportunities and create a career.</p>
  2369.  
  2370.  
  2371.  
  2372. <p><a href="https://www.infoq.com/presentations/staff-plus-non-tech/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Staff+ Engineering Beyond Big Techs: How to Succeed in the Technical Path on Non-Tech Companies</a> – <a href="https://loiane.com/" target="_blank" rel="noopener">Loiane Groner</a> talks about why companies not focused on tech should hire skilled tech people.</p>
  2373.  
  2374.  
  2375.  
  2376. <p><a href="https://www.infoq.com/news/2024/03/experimental-culture-software/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Fostering an Experimentation Culture in Software Development</a> – Find out what experimentation culture is and why it can be beneficial in software development.</p>
  2377.  
  2378.  
  2379.  
  2380. <p><a href="https://www.infoq.com/podcasts/observability-through-ai/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Making Code Explain Itself – Observability Through AI</a> – In this episode, <a href="https://www.infoq.com/profile/Shane-Hastie" target="_blank" rel="noopener">Shane Hastie</a> speaks with <a href="https://www.infoq.com/profile/Elizabeth-Lawler/" target="_blank" rel="noopener">Dr. Elizabeth Lawler</a>, CEO of AppMap, about the role of observability in today&#8217;s AI-driven environment, the creative aspects of coding, and the common challenges that developers face daily.</p>
  2381.  
  2382.  
  2383.  
  2384. <h2 class="wp-block-heading">And Finally…</h2>
  2385.  
  2386.  
  2387.  
  2388. <p><a href="https://blog.jetbrains.com/idea/2024/03/drop-the-baggage-use-_-for-unnamed-local-variables-and-patterns-in-java-22/">Drop the Baggage: Use ‘_’ for Unnamed Local Variables and Patterns in Java 22</a> – <a href="https://twitter.com/eMalaGupta" target="_blank" rel="noopener">Mala Gupta </a>studies the Unnamed Variables &amp; Patterns feature that allows you to skip over unused local variables and patterns by replacing their names or types with an underscore (_).</p>
  2389.  
  2390.  
  2391.  
  2392. <p><a href="https://blog.jetbrains.com/idea/2024/03/easy-hacks-how-to-throw-java-exceptions/">Easy Hacks: How to Throw Java Exceptions</a> – Catching exceptions is crucial, but knowing how to throw them properly is just as vital. In his blog post, <a href="https://github.com/maartenba" target="_blank" rel="noopener">Maarten Balliauw</a> demonstrates how to throw Java exceptions, details their various types, and explains how to make custom exceptions, among other things.</p>
  2393.  
  2394.  
  2395.  
  2396. <p><a href="https://blog.jetbrains.com/idea/2024/03/getting-started-with-databases-in-intellij-idea/">Getting Started with Databases in IntelliJ IDEA </a>– Have you ever wondered how IntelliJ IDEA handles databases? Well, today is the perfect opportunity to find out in our database tutorial on initial setups and first steps.</p>
  2397.  
  2398.  
  2399.  
  2400. <p><a href="https://blog.jetbrains.com/idea/2024/03/k2-kotlin-mode-alpha-in-intellij-idea/">K2 Kotlin Mode (Alpha) in IntelliJ IDEA</a> – Starting from v.2024.1, IntelliJ IDEA comes with an optional K2 mode. In this mode, the IDE uses the K2 compiler for faster and more robust Kotlin code analysis. Read this article to learn the details.</p>
  2401.  
  2402.  
  2403.  
  2404. <p><a href="https://www.youtube.com/watch?v=yAxLR1YPwyQ" target="_blank" rel="noopener">Build a Spring Boot app with AI Assistant</a> – Together with <a href="https://maritvandijk.com/" target="_blank" rel="noopener">Marit van Dijk</a>, find out how JetBrains’ AI Assistant helps in creating a Spring Boot app.&nbsp;</p>
  2405.  
  2406.  
  2407.  
  2408. <p>That wraps up today’s edition!</p>
  2409.  
  2410.  
  2411.  
  2412. <p>We’re already gathering ideas for the next Java Annotated Monthly, so feel free to share your suggestions via <a href="https://mail.google.com/mail/u/0/?fs=1&amp;tf=cm&amp;source=mailto&amp;to=JAM@jetbrains.com" target="_blank" rel="noopener">email</a> or <a href="https://twitter.com/intellijidea?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor" target="_blank" rel="noopener">tweet</a> by April 20. Also, don’t forget to explore our <a href="https://www.jetbrains.com/lp/jam/?_gl=1*1b262pc*_ga*MjEyOTAxMTI2OC4xNzA1NjUyNDE1*_ga_9J976DJZ68*MTcxMjEzMjg2NC4xNTMuMS4xNzEyMTMyOTUzLjMxLjAuMA..&amp;_ga=2.45553133.817279313.1712042887-2129011268.1705652415" target="_blank" rel="noopener">archive of past JAM</a> issues, which is perfect for catching up on any missed blog posts or articles.</p>
  2413. ]]></content:encoded>
  2414. </item>
  2415. <item>
  2416. <title>K2 Kotlin Mode (Alpha) in IntelliJ IDEA</title>
  2417. <link>https://blog.jetbrains.com/idea/2024/03/k2-kotlin-mode-alpha-in-intellij-idea/</link>
  2418. <dc:creator><![CDATA[Anton Yalyshev]]></dc:creator>
  2419. <pubDate>Mon, 25 Mar 2024 14:43:31 +0000</pubDate>
  2420. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2024/03/DSGN-18611_Kotlin_K2_Blog-Featured-1280x720-2x.png</featuredImage> <product ><![CDATA[kotlin]]></product>
  2421. <category><![CDATA[news]]></category>
  2422. <category><![CDATA[kotlin]]></category>
  2423. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=459280</guid>
  2424.  
  2425. <description><![CDATA[Starting from v.2024.1, IntelliJ IDEA comes with an optional K2 mode. In this mode the IDE uses the K2 compiler for faster and more robust Kotlin code analysis.The IDE now has two modes: These modes affect only code analysis in the IDE. If you want to compile your project with the K2 compiler, you will [&#8230;]]]></description>
  2426. <content:encoded><![CDATA[
  2427. <p>Starting from v.2024.1, IntelliJ IDEA comes with an optional K2 mode. In this mode the IDE uses the K2 compiler for faster and more robust Kotlin code analysis.<br>The IDE now has two modes:</p>
  2428.  
  2429.  
  2430.  
  2431. <ul>
  2432. <li>Classic mode (enabled by default) – the IDE uses the standard (K1) Kotlin compiler to analyze Kotlin code.</li>
  2433.  
  2434.  
  2435.  
  2436. <li>K2 mode (now in Alpha) – the IDE uses the new K2 compiler as its code analysis engine.</li>
  2437. </ul>
  2438.  
  2439.  
  2440.  
  2441. <p>These modes affect only code analysis in the IDE. If you want to <a href="https://kotlinlang.org/docs/whatsnew-eap.html" target="_blank" rel="noopener">compile your project with the K2 compiler</a>, you will need to specify this in the project’s build settings. The K2 IDE mode does not depend on the Kotlin compiler version specified in the project&#8217;s build settings.</p>
  2442.  
  2443.  
  2444.  
  2445. <h2 class="wp-block-heading">What is the K2 mode?</h2>
  2446.  
  2447.  
  2448.  
  2449. <p>We rewrote the Kotlin compiler from scratch to improve performance and enhance internal architecture, facilitating further development of the Kotlin language. Furthermore, as the Kotlin compiler is used as a code analysis engine in the IDE, the K2 compiler is optimized to meet the requirements of the IDE.</p>
  2450.  
  2451.  
  2452.  
  2453. <p>The K2 mode provides:</p>
  2454.  
  2455.  
  2456.  
  2457. <ul>
  2458. <li><strong>Compatibility with future Kotlin features</strong>: The new mode will support future language features that will only be provided in the K2 Kotlin compiler.</li>
  2459.  
  2460.  
  2461.  
  2462. <li><strong>Code analysis stability</strong>: We expect code analysis to be more stable, which will mean no more <em>Highlighting is suspended due to internal error</em> messages! Thanks to the colossal architecture redesign, the quality and reliability of the IDE features should improve.</li>
  2463.  
  2464.  
  2465.  
  2466. <li><strong>Better IDE performance</strong>: The speed of Kotlin code highlighting and Kotlin code completion has been significantly increased.</li>
  2467. </ul>
  2468.  
  2469.  
  2470.  
  2471. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="1700" height="832" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/01_Performance-tests-K2-2x-1.png" alt="" class="wp-image-459840"/><figcaption class="wp-element-caption">Performance tests on IntelliJ Ultimate source base</figcaption></figure>
  2472.  
  2473.  
  2474.  
  2475. <ul>
  2476. <li><strong>Improved API</strong>: In subsequent versions, we’re planning to introduce a resilient and easy-to-use API for third-party plugins.</li>
  2477. </ul>
  2478.  
  2479.  
  2480.  
  2481. <h2 class="wp-block-heading">What IDE features are supported?</h2>
  2482.  
  2483.  
  2484.  
  2485. <p>To provide support for the K2 compiler in IntelliJ IDEA, we wrote from scratch many IDE features as they strongly rely on the K1 compiler’s API. It allowed us to rethink the current design and solve problems that can’t be addressed in the K1-based IDE configuration.</p>
  2486.  
  2487.  
  2488.  
  2489. <p>We’re not rushing to implement or migrate as many IDE features as possible. We aim to perfect a smaller number of features each time, ensuring the best quality. We will steadily enrich IDE feature support with each subsequent release, hopefully with the benefit of your feedback.</p>
  2490.  
  2491.  
  2492.  
  2493. <p>The K2 mode in IntelliJ IDEA 2024.1 supports:</p>
  2494.  
  2495.  
  2496.  
  2497. <ul>
  2498. <li>Code highlighting.</li>
  2499.  
  2500.  
  2501.  
  2502. <li>Code completion.</li>
  2503.  
  2504.  
  2505.  
  2506. <li>Navigation.&nbsp;</li>
  2507.  
  2508.  
  2509.  
  2510. <li><em>Find Usages.</em></li>
  2511.  
  2512.  
  2513.  
  2514. <li>Debugging.</li>
  2515.  
  2516.  
  2517.  
  2518. <li>Refactorings<strong> </strong>like <em>Rename</em>, <em>Introduce Variable</em>, <em>Move</em>, <em>Inline Variable</em>, <em>Change Signature</em>, and <em>Safe Delete.</em></li>
  2519.  
  2520.  
  2521.  
  2522. <li>Basic editing features, such as code formatting, parameter info, gutter icons, QuickDoc, the import optimizer, and <em>Type Hierarchy</em>.</li>
  2523.  
  2524.  
  2525.  
  2526. <li>Some of the most popular inspections, intentions, and quick-fixes.</li>
  2527.  
  2528.  
  2529.  
  2530. <li>New project wizards, project importing, and running tests and applications from IntelliJ IDEA.</li>
  2531. </ul>
  2532.  
  2533.  
  2534.  
  2535. <p></p>
  2536.  
  2537.  
  2538.  
  2539. <p>In IntelliJ IDEA 2024.1, K2 mode <strong>does not</strong> support:&nbsp;</p>
  2540.  
  2541.  
  2542.  
  2543. <ul>
  2544. <li>Kotlin Multiplatform projects (KMP).</li>
  2545.  
  2546.  
  2547.  
  2548. <li>Android projects.</li>
  2549.  
  2550.  
  2551.  
  2552. <li>The <em>Extract Function</em> refactoring.</li>
  2553.  
  2554.  
  2555.  
  2556. <li>Inlay hints.</li>
  2557.  
  2558.  
  2559.  
  2560. <li>Java-to-Kotlin conversion.</li>
  2561.  
  2562.  
  2563.  
  2564. <li><em>Methods</em> and <em>Calls Hierarchy</em>.</li>
  2565.  
  2566.  
  2567.  
  2568. <li><em>Smart Step Into</em>.&nbsp;</li>
  2569.  
  2570.  
  2571.  
  2572. <li>Tools for debugging coroutines.</li>
  2573.  
  2574.  
  2575.  
  2576. <li>Code analysis in .gradle.kts files.</li>
  2577.  
  2578.  
  2579.  
  2580. <li>Other minor features.</li>
  2581.  
  2582.  
  2583.  
  2584. <li><strong>Third-party IntelliJ IDEA plugins depending on the Kotlin plugin will be disabled. </strong>We will provide migration guidance for third-party plugin authors soon!&nbsp;</li>
  2585. </ul>
  2586.  
  2587.  
  2588.  
  2589. <p></p>
  2590.  
  2591.  
  2592.  
  2593. <p>Support for missing features will be added in the upcoming releases.</p>
  2594.  
  2595.  
  2596.  
  2597. <h2 class="wp-block-heading">How to try the K2 Kotlin compiler mode?</h2>
  2598.  
  2599.  
  2600.  
  2601. <p>Go to<em> Settings | Languages &amp; Frameworks | Kotlin, </em>and click the <em>Enable the K2-based Kotlin plugin </em>checkbox to enable the new mode<em>.</em></p>
  2602.  
  2603.  
  2604.  
  2605. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="1800" height="722" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/K2-Kotlin-Mode.png" alt="How to enable the Kotlin K2 Mode in IntelliJ IDEA" class="wp-image-459827"/></figure>
  2606.  
  2607.  
  2608.  
  2609. <p>After switching on the K2 mode, you will need to restart the IDE.</p>
  2610.  
  2611.  
  2612.  
  2613. <h2 class="wp-block-heading">Feedback</h2>
  2614.  
  2615.  
  2616.  
  2617. <p>We welcome your feedback and would love to hear about your experience with IntelliJ IDEA’s K2 Kotlin mode, the features you want us to bring to this mode, and your thoughts about its performance.</p>
  2618.  
  2619.  
  2620.  
  2621. <p>Please share your experience with us by leaving a comment below, messaging us in our <a href="https://kotlinlang.slack.com/archives/C0B8H786P" target="_blank" rel="noopener">public Slack channel</a>, or creating an issue in <a href="https://youtrack.jetbrains.com/issues/KTIJ" target="_blank" rel="noopener">YouTrack</a>.&nbsp;</p>
  2622.  
  2623.  
  2624.  
  2625. <p>We are actively working to improve this functionality, and your feedback will help us!&nbsp;</p>
  2626.  
  2627.  
  2628.  
  2629. <p><em>Happy developing!</em></p>
  2630. ]]></content:encoded>
  2631.                    <language>
  2632.                        <code><![CDATA[zh-hans]]></code>
  2633.                        <url>https://blog.jetbrains.com/zh-hans/idea/2024/03/k2-kotlin-mode-alpha-in-intellij-idea/</url>
  2634.                    </language>
  2635.                 </item>
  2636. <item>
  2637. <title>IntelliJ IDEA 2024.1 Release Candidate Is Here!</title>
  2638. <link>https://blog.jetbrains.com/idea/2024/03/intellij-idea-2024-1-release-candidate/</link>
  2639. <dc:creator><![CDATA[Maria Kosukhina]]></dc:creator>
  2640. <pubDate>Thu, 21 Mar 2024 18:40:43 +0000</pubDate>
  2641. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2024/03/IntelliJ-IDEA-2024.1-RC-1.png</featuredImage> <category><![CDATA[eap]]></category>
  2642. <category><![CDATA[2024-1-eap]]></category>
  2643. <category><![CDATA[intellij-idea-2024-1]]></category>
  2644. <category><![CDATA[intellij-idea-2024-1-eap]]></category>
  2645. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=459001</guid>
  2646.  
  2647. <description><![CDATA[The IntelliJ IDEA 2024.1 RC is now available! You can get the latest build from our website, through the free Toolbox App, or via snaps for Ubuntu. To use this build, you need to have an active subscription to IntelliJ IDEA Ultimate. With the major release on the horizon, there&#8217;s no better time to explore [&#8230;]]]></description>
  2648. <content:encoded><![CDATA[
  2649. <p>The IntelliJ IDEA 2024.1 RC is now available!</p>
  2650.  
  2651.  
  2652.  
  2653. <p>You can get the latest build from our <a href="https://www.jetbrains.com/idea/nextversion/" target="_blank" rel="noopener">website</a>, through the free <a href="https://www.jetbrains.com/toolbox-app/" target="_blank" rel="noopener">Toolbox App</a>, or via snaps for Ubuntu.</p>
  2654.  
  2655.  
  2656.  
  2657. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="2560" height="1440" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/IntelliJ-IDEA-2024.1-RC-1.png" alt="" class="wp-image-459025"/></figure>
  2658.  
  2659.  
  2660.  
  2661. <p><strong><em>To use this build, you need to have an active subscription to IntelliJ IDEA Ultimate.</em></strong></p>
  2662.  
  2663.  
  2664.  
  2665. <p>With the major release on the horizon, there&#8217;s no better time to explore the newly introduced features before the official launch.</p>
  2666.  
  2667.  
  2668.  
  2669. <p>Get an overview of the newest additions to the IDE in our <a href="https://blog.jetbrains.com/idea/tag/intellij-idea-2024-1-eap/">series of 2024.1 EAP blog posts</a>. Additionally, you can read the full details about the recent updates in this build in the <a href="https://youtrack.jetbrains.com/articles/IDEA-A-2100661892/IntelliJ-IDEA-2024.1-RC-241.14494.158-build-Release-Notes" data-type="link" data-id="https://youtrack.jetbrains.com/articles/IDEA-A-2100661892/IntelliJ-IDEA-2024.1-RC-241.14494.158-build-Release-Notes" target="_blank" rel="noopener">release notes</a>.</p>
  2670.  
  2671.  
  2672.  
  2673. <p>As we put the final touches to ensure a flawless release, we’d like to thank all participants who actively contributed to the Early Access Program for version 2024.1.</p>
  2674.  
  2675.  
  2676.  
  2677. <p>Stay tuned for upcoming blog posts that will delve into the latest updates and notable features in IntelliJ IDEA EAP 2024.1.</p>
  2678.  
  2679.  
  2680.  
  2681. <p>If you encounter any bugs or hiccups, please report them to our <a href="https://youtrack.jetbrains.com/issues/IDEA" target="_blank" rel="noopener">issue tracker</a>. Your feedback is critical, so please share your insights on the latest IDE additions by reaching out to us on <a href="https://twitter.com/intellijidea" target="_blank" rel="noopener">X (formerly Twitter)</a> or leaving a comment below.</p>
  2682.  
  2683.  
  2684.  
  2685. <p>Happy developing!</p>
  2686. ]]></content:encoded>
  2687. </item>
  2688. <item>
  2689. <title>IntelliJ IDEA 2023.3.6 Is Out!</title>
  2690. <link>https://blog.jetbrains.com/idea/2024/03/intellij-idea-2023-3-6/</link>
  2691. <dc:creator><![CDATA[Maria Kosukhina]]></dc:creator>
  2692. <pubDate>Thu, 21 Mar 2024 17:44:24 +0000</pubDate>
  2693. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2024/03/IntelliJ-IDEA-2023.3.6.png</featuredImage> <category><![CDATA[releases]]></category>
  2694. <category><![CDATA[bug-fix-update]]></category>
  2695. <category><![CDATA[intellij-idea-2023-3]]></category>
  2696. <category><![CDATA[intellij-idea-2023-3-6]]></category>
  2697. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=459037</guid>
  2698.  
  2699. <description><![CDATA[We’ve just released a bug-fix update for v2023.3. You can download the latest build from our website, via the Toolbox App, or by using snaps for Ubuntu. This latest version brings an important fix for macOS users: For more details, refer to the release notes. If you spot any bugs, please report them via our [&#8230;]]]></description>
  2700. <content:encoded><![CDATA[
  2701. <p>We’ve just released a bug-fix update for v2023.3. You can download the latest build from our <a href="https://www.jetbrains.com/idea/download/other.html" target="_blank" rel="noopener">website</a>, via the <a href="https://www.jetbrains.com/toolbox-app/" target="_blank" rel="noopener">Toolbox App</a>, or by using snaps for Ubuntu.</p>
  2702.  
  2703.  
  2704.  
  2705. <p>This latest version brings an important fix for macOS users:</p>
  2706.  
  2707.  
  2708.  
  2709. <ul>
  2710. <li>We’ve introduced a workaround to reduce the probability of IDE crashes after updating to macOS Sonoma 14.4. [<a href="https://youtrack.jetbrains.com/issue/JBR-6802" target="_blank" rel="noopener">JBR-6802</a>]</li>
  2711. </ul>
  2712.  
  2713.  
  2714.  
  2715. <p></p>
  2716.  
  2717.  
  2718.  
  2719. <p>For more details, refer to the <a href="https://youtrack.jetbrains.com/articles/IDEA-A-2100661893/IntelliJ-IDEA-2023.3.6-233.15026.9-build-Release-Notes" target="_blank" rel="noreferrer noopener">release notes</a>. If you spot any bugs, please report them via our <a href="https://youtrack.jetbrains.com/issues/IDEA" target="_blank" rel="noopener">issue tracker</a>.</p>
  2720.  
  2721.  
  2722.  
  2723. <p>Happy developing!</p>
  2724.  
  2725.  
  2726.  
  2727. <p></p>
  2728. ]]></content:encoded>
  2729. </item>
  2730. <item>
  2731. <title>Java 22 and IntelliJ IDEA</title>
  2732. <link>https://blog.jetbrains.com/idea/2024/03/java-22-and-intellij-idea/</link>
  2733. <dc:creator><![CDATA[Mala Gupta]]></dc:creator>
  2734. <pubDate>Wed, 20 Mar 2024 18:04:54 +0000</pubDate>
  2735. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2024/03/DSGN-18941-IDEA-Blog_Featured_image_1280x600.png</featuredImage> <category><![CDATA[idea]]></category>
  2736. <category><![CDATA[intellij-idea]]></category>
  2737. <category><![CDATA[intellijidea]]></category>
  2738. <category><![CDATA[java]]></category>
  2739. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=457655</guid>
  2740.  
  2741. <description><![CDATA[Java 22 is here, fully supported by IntelliJ IDEA 2024.1, allowing you to use these features now! Java 22 has something for all &#8211; from new developers to Java experts, features related to performance and security for big organizations to those who like working with bleeding edge technology, from additions to the Java language to [&#8230;]]]></description>
  2742. <content:encoded><![CDATA[<p>Java 22 is here, fully supported by <a href="https://www.jetbrains.com/idea/nextversion/" target="_blank" rel="noopener">IntelliJ IDEA 2024.1</a>, allowing you to use these features now!</p>
  2743. <p>Java 22 has something for all &#8211; from new developers to Java experts, features related to performance and security for big organizations to those who like working with bleeding edge technology, from additions to the Java language to improvements in the JVM platform, and more.</p>
  2744. <p>It is also great to see how all these Java features, release after release, work together to create more possibilities and have a bigger impact on how developers create their applications that address existing pain points, perform better and are more secure.</p>
  2745. <p>This blog post doesn’t include a comprehensive coverage of all the Java 22 features. If you are interested in that, I’d recommend you to check out <a href="https://openjdk.org/projects/jdk/22/" target="_blank" rel="noopener">this link</a> to know everything about what’s new and changing in Java 22, including the bugs.</p>
  2746. <p>In this blog post, I’ll cover how IntelliJ IDEA helps you get started, up and running with some of the Java 22 features, such as, <a href="https://openjdk.org/jeps/459" target="_blank" rel="noopener">String Templates</a>, <a href="https://openjdk.org/jeps/463" target="_blank" rel="noopener">Implicitly Declared Classes and Instance Main Methods</a>, <a href="https://openjdk.org/jeps/447" target="_blank" rel="noopener">Statements before super()</a>, and <a href="https://openjdk.org/jeps/456" target="_blank" rel="noopener">Unnamed variables and patterns</a>.</p>
  2747. <p>Over the past month, I published separate blog posts to cover each of these topics in detail. If you are new to these topics, I’d highly recommend you check out those detailed blog posts (I&#8217;ve included their links in the relevant subsections in this blog post). In this blog post, I’ll cover some sections from those blog posts, especially how IntelliJ IDEA supports them. Let&#8217;s start by configuring IntelliJ IDEA to work with the Java 22 features.</p>
  2748. <h2>IntelliJ IDEA Configuration</h2>
  2749. <p>Java 22 support is available in <a href="https://www.jetbrains.com/idea/nextversion/" target="_blank" rel="noopener">IntelliJ IDEA 2024.1 Beta</a>. The final version will release soon in March 2024.</p>
  2750.  
  2751.  
  2752. <p>In your Project Settings, set the SDK to Java 22. For the language level, select ‘22 (Preview) &#8211; Statements before super(), string templates (2nd preview etc.)’ on both the Project and Modules tab, as shown in the below settings screenshot:</p>
  2753.  
  2754.  
  2755.  
  2756. <figure class="wp-block-image"><img decoding="async" loading="lazy" width="3576" height="1508" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/image-47.png" alt="" class="wp-image-458931"/></figure>
  2757.  
  2758.  
  2759. <p>If you do not have Java 22 downloaded to your system yet, don&#8217;t worry; IntelliJ IDEA has your back! You could use the same Project settings window, select &#8216;Download JDK&#8217;, after you click on the drop down next to SDK. You&#8217;ll see the below popup that would enable you to choose from a list of vendors (such as Oracle OpenJDK, GraalVM, Azul Zulu and others):</p>
  2760. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/config-downld.png" alt=""/></figure>
  2761. <p>With the configuration under our belt, let&#8217;s get started with covering one of my favorite new features, that is, String Templates.</p>
  2762. <p><H2>String Templates (Preview Language feature)</H2><br />
  2763. The existing String concatenation options are difficult to work with and could be error prone; String templates offer a better alternative, that is, String interpolation with additional benefits such as validation, security and transformations via template processors. </p>
  2764. <p>Please check out my detailed blog post on this topic: <a href="https://blog.jetbrains.com/idea/2023/11/string-templates-in-java-why-should-you-care/">String Templates in Java &#8211; why should you care?</a> if you are new to this topic. It covers all the basics, including why you need String Templates, with multiple hands-on examples on built-in and user defined String processors.</p>
  2765. <p><H3>IntelliJ IDEA can highlight code that could be replaced with String Templates</H3><br />
  2766. Let’s assume you defined the following code to log a message that combines string literals and variable values using the concatenation operator:</p>
  2767. <pre class="EnlighterJSRAW" data-enlighter-language="">
  2768. public void processOrder(int orderId, String product, int qty, LocalDate orderDate) {
  2769.   if (quantity &lt;= 0) {
  2770.       String errorMessage = &quot;Invalid order quantity: &quot; + qty + &quot; for product &quot; + product + &quot;, order ID &quot; + orderId;
  2771.       logger.error(errorMessage);
  2772.       return;
  2773.   }
  2774.   //.. Remaining code
  2775. }</pre>
  2776. <p>The output from the preceding code could be an issue if you miss adding spaces in the String literals. The code isn’t quite easy to read or understand due to multiple opening and closing double quotes, that is, <code>"</code> and the <code>+</code> operator, and it would get worse if you add more literals, or variable values to it. </p>
  2777. <p>You could replace the preceding code with either <code>StringBuilder.append()</code>, <code>String.format()</code> or <code>String.formatted()</code> method or by using the class <code>MessageFormat</code> (as shown in my <a href="https://blog.jetbrains.com/idea/2023/11/string-templates-in-java-why-should-you-care/">detailed blog post</a> on this topic), but each of these methods have their own issues.</p>
  2778. <p>Don’t worry; IntelliJ IDEA could detect such code, suggest that you could replace it with String template, and do that for you, as shown below. It doesn’t matter if you are not even aware of the syntax of the String templates, IntelliJ IDEA has your back &#x1f642;</p>
  2779. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/hello-world-string-templates.gif" alt="" class="wp-image-16062"/></figure>
  2780. <p><H3>Embedded expressions in String Templates and IntelliJ IDEA</H3><br />
  2781. The syntax to embed a remplate expression (variable, expressible or a method call) is still new to what Java developers are used to and could be challenging to use without help. Don’t worry, IntelliJ IDEA has your back!</p>
  2782. <p>Each embedded expression must be enclosed within \{}. When you type \{, IntelliJ IDEA adds the closing ‘}’ for you. It also offers code completion to help you select a variable in scope, or any methods on it. If the code that you insert doesn’t compile, IntelliJ IDEA will highlight that too (as a compilation error), as shown in the following gif:</p>
  2783. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/insert-variables3.gif" alt="" class="wp-image-16062"/></figure>
  2784. <p><H3>Using String Templates with Text Blocks</H3><br />
  2785. Text blocks are quite helpful when working with string values that span multiple lines, such as, JSON, XML, HTML, SQL or other values that are usually processed by external environments. It is common for us Java developers to create such string values using a combination of string literals and variable values (variables, expressions or method calls). </p>
  2786. <p>The example below shows how IntelliJ IDEA could detect and create a text block using String templates for multiline string values that concatenates string literals with variable values. It also shows how IntelliJ IDEA provides code completion for variable names within such blocks. When you type in <code>\{</code>, IntelliJ IDEA adds <code>}</code>. As you start typing the variable name <code>countryName</code>, it shows the available variables in that context:</p>
  2787. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/textblocks1.gif" alt="" class="wp-image-16062"/></figure>
  2788. <p><H3>Language injection and String Templates</H3><br />
  2789. You could also <a href="https://www.jetbrains.com/help/idea/using-language-injections.html" target="_blank" rel="noopener">inject a language or a reference</a> in string values that spans single line or multiple lines, such as, a text block. By doing so, you get comprehensive coding assistance to edit the literal value. You could avail of this feature temporarily or permanently by using the <code>@Language</code> annotation, as shown below:</p>
  2790. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/textblocks-language-injection.gif" alt="" class="wp-image-16062"/></figure>
  2791. <p>You can check out <a href="https://www.jetbrains.com/help/idea/using-language-injections.html#inject_language" target="_blank" rel="noopener">this link</a> for detailed information on the benefits and usage of injecting language or reference in IntelliJ IDEA.</p>
  2792. <p><H3>Predefined Template Processors </H3><br />
  2793. With the String templates, you get access to predefined processors like the <code>STR</code>, <code>FMT</code> and <code>RAW</code>. I’d highly recommend you to check out my <a href="https://blog.jetbrains.com/idea/2023/11/string-templates-in-java-why-should-you-care/">detailed blog post on String templates</a> for multiple hands-on examples on it.</p>
  2794. <p><H3>Custom Template Processor</H3></p>
  2795. <p>Let’s work with a custom String template that isn’t covered in my previous blog post.</p>
  2796. <p>Imagine you’d like to create an instance of a record, say, <code>WeatherData</code>, that stores the details of the JSON we used in the previous section. Assume you define the following records to store this weather data represented by the JSON in the previous section:</p>
  2797. <pre class="EnlighterJSRAW" data-enlighter-language="">
  2798. public record WeatherData (String cod, City city) { }
  2799. public record City (int id, String name, String country, Coord coord) {}
  2800. public record Coord (double lat, double lon) { }</pre>
  2801. <p>You could create a method to return a custom String template that would process interpolated string, accept a class name (<code>WeatherData</code> for this example) and return its instance:</p>
  2802. <pre class="EnlighterJSRAW" data-enlighter-language="">
  2803. public &lt;T&gt; StringTemplate.Processor&lt;T, RuntimeException&gt; getJSONProcessorFor(Class&lt;T&gt; classType) {
  2804.        return StringTemplate.Processor.of(
  2805.                (StringTemplate st) -&gt; {
  2806.  
  2807.                    List&lt;Object&gt; sanitizedLst = new ArrayList&lt;&gt;();
  2808.                    for (Object templateExpression : st.values()) {
  2809.                        switch (templateExpression) {
  2810.                            case String str -&gt; sanitizeStr(str, sanitizedLst);
  2811.                            case Number _, Boolean _ -&gt; sanitizedLst.add(templateExpression);
  2812.                            case null -&gt; sanitizedLst.add(&quot;&quot;);
  2813.                            default -&gt; throw new IllegalArgumentException(&quot;Invalid value&quot;);
  2814.                        }
  2815.                    }
  2816.                    String jsonSource = StringTemplate.interpolate(st.fragments(), sanitizedLst);
  2817.                    System.out.println(jsonSource);
  2818.  
  2819.                    try {
  2820.                        ObjectMapper objectMapper = new ObjectMapper();
  2821.                        return objectMapper.readValue(jsonSource, classType);
  2822.                    } catch (JsonProcessingException e) {
  2823.                        throw new RuntimeException(e);
  2824.                    }
  2825.                });
  2826.    }</pre>
  2827. <p>Depending on the logic of your application, you might want to escape, delete or throw errors for the special characters that you encounter in the the JSON values interpolated via template expressions, as follows (the following method chooses to escape the special characters and include them as part of the JSON value):</p>
  2828. <pre class="EnlighterJSRAW" data-enlighter-language="">
  2829.    private void sanitizeStr(String str, List&lt;Object&gt; sanitizedLst) {
  2830.        String sanitizedStr = str.replace(&quot;\\&quot;, &quot;\\\\&quot;)
  2831.                                 .replace(&quot;\&quot;&quot;, &quot;\\\&quot;&quot;)
  2832.                                 .replace(&quot;/&quot;, &quot;\\/&quot;)
  2833.                                 .replace(&quot;\b&quot;, &quot;\\b&quot;)
  2834.                                 .replace(&quot;\f&quot;, &quot;\\f&quot;)
  2835.                                 .replace(&quot;\n&quot;, &quot;\\n&quot;)
  2836.                                 .replace(&quot;\r&quot;, &quot;\\r&quot;)
  2837.                                 .replace(&quot;\t&quot;, &quot;\\t&quot;);
  2838.        sanitizedLst.add(&quot;\&quot;&quot; + sanitizedStr + &quot;\&quot;&quot;);
  2839.    }</pre>
  2840. <p>You could initialize and use this custom JSON template processor as below. Note how elegant and concise the solution is with a combination of textblocks and String templates. The JSON is easy to read, write and understand (thanks to text blocks). The template expressions make it clear and obvious about the sections that are not constants and would be injected by the variables. At the end, the custom template processor <code>WEATHER_JSON</code> would ensure the resultant JSON is validated according to the logic you defined and returns an instance of <code>WeatherData</code> (doesn&#8217;t it sound magical?) :</p>
  2841. <pre class="EnlighterJSRAW" data-enlighter-language="">
  2842. StringTemplate.Processor&lt;WeatherData, RuntimeException&gt; WEATHER_JSON = getJSONProcessorFor(WeatherData.class);
  2843.  
  2844. String cod = null;
  2845. String name = &quot;Amazing City&quot;;
  2846. Double lat = 55.7522;
  2847.    
  2848. WeatherData weatherData = WEATHER_JSON.&quot;&quot;&quot;
  2849.                  {
  2850.                    &quot;cod&quot;: \{cod},
  2851.                    &quot;city&quot;: {
  2852.                      &quot;id&quot;: 524901,,,
  2853.                      &quot;name&quot;: \{name},
  2854.                      &quot;country&quot;: &quot;XYZ&quot;,
  2855.                      &quot;coord&quot;: {
  2856.                        &quot;lat&quot;: \{lat},
  2857.                        &quot;lon&quot;: 37.6156
  2858.                      }
  2859.                    }
  2860.                  }&quot;&quot;&quot;;</pre>
  2861. <p>Do not miss to check out my detailed blog post on this topic: <a href="https://blog.jetbrains.com/idea/2023/11/string-templates-in-java-why-should-you-care/">String Templates in Java &#8211; why should you care?</a> to discover how you could use the predefined String templates like <code>FMT</code>, to generate properly formatted receipts for, say, your neighborhood stationery store, or, say encode and decode combinations like :) or :( to emojis like &#x1f642; or &#x2639;&#xfe0f;. Does that sound fun to you?</p>
  2862. <p><H2>Implicitly Declared Classes and Instance Main Methods (Preview language feature)</H2></p>
  2863. <p>Introduced as a preview language feature in Java 21, <a href="https://openjdk.org/jeps/463" target="_blank" rel="noopener">this feature</a> is in its second preview in Java 22. </p>
  2864. <p>It would revolutionize how new Java developers would get started learning Java. It simplifies the initial steps for students when they start learning basics, such as variable assignment, sequence, conditions and iteration. Students no longer need to declare an explicit class to develop their code, or write their <code>main()</code> method using this signature &#8211; <code>public static void main(String [])</code>. With this feature, classes could be declared implicitly and <i>the</i> <code>main()</code> method can be created with a shorter list of keywords.</p>
  2865. <p>If you are new to this feature, I&#8217;d highly recommend you to check out my detailed blog post: <a href="https://blog.jetbrains.com/idea/2024/02/helloworld-and-main-meet-minimalistic/">‘HelloWorld’ and ‘main()’ meet minimalistic</a> on this feature. In this blog post, I&#8217;ll include a few of the sections from it.</p>
  2866. <h3 class="wp-block-heading">Class ‘HelloWorld’ before and after Java 21</h3>
  2867. <p><!-- /wp:heading --></p>
  2868. <p><!-- wp:paragraph --></p>
  2869. <p>Before Java 21, you would need to define a class, say, <code>HelloWorld</code>, that defined a <code>main()</code> method with a specific list of keywords, to print any text, say, &#8216;Hello World&#8217; to the console, as follows:</p>
  2870. <p><!-- /wp:paragraph --></p>
  2871. <p><!-- wp:enlighter/codeblock --></p>
  2872. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public class HelloWorld {
  2873.    public static void main(String[] args) {
  2874.        System.out.println("Hello World");
  2875.    }
  2876. }
  2877. </pre>
  2878. <p><!-- /wp:enlighter/codeblock --></p>
  2879. <p><!-- wp:paragraph --></p>
  2880. <p>With Java 21, this initial step has been shortened. You can define a source code file, say, HelloWorld.java, with the following code, to print a message to the console (it doesn’t need to define a class; it has a shorter signature for method <code>main()</code>):</p>
  2881. <p><!-- /wp:paragraph --></p>
  2882. <p><!-- wp:enlighter/codeblock --></p>
  2883. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">void main() {
  2884.    System.out.println("Hello World");
  2885. }
  2886. </pre>
  2887. <p><!-- /wp:enlighter/codeblock --></p>
  2888. <p><!-- wp:paragraph --></p>
  2889. <p>The preceding code is simpler than what was required earlier. Let’s see how this change could help you focus on what you need, rather than what you don’t.</p>
  2890. <p><!-- /wp:paragraph --></p>
  2891. <h3 class="wp-block-heading">Compiling and executing your code</h3>
  2892. <p><!-- /wp:heading --></p>
  2893. <p><!-- wp:paragraph --></p>
  2894. <p>Once you are done writing your code, the next step is to execute it.</p>
  2895. <p><!-- /wp:paragraph --></p>
  2896. <p><!-- wp:paragraph --></p>
  2897. <p>On the command prompt, you could use the <code>javac</code> and <code>java</code> commands to compile and execute your code. Assuming you have defined your code in a source code file HelloWorld.java, you could use the following commands to run and execute it:</p>
  2898. <p><!-- /wp:paragraph --></p>
  2899. <p><!-- wp:enlighter/codeblock --></p>
  2900. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">C:\code\MyHelloWorldProject\javac HelloWorld.java
  2901. C:\code\MyHelloWorldProject\java HelloWorld
  2902. </pre>
  2903. <p><!-- /wp:enlighter/codeblock --></p>
  2904. <p><!-- wp:paragraph --></p>
  2905. <p>Since Java 11, it is possible to skip the compilation process for code defined in a single source code file, so you could use just the second command (by specifying the name of the source code file, as follows):</p>
  2906. <p><!-- /wp:paragraph --></p>
  2907. <p><!-- wp:enlighter/codeblock --></p>
  2908. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">C:\code\MyHelloWorldProject\java HelloWorld.java
  2909. </pre>
  2910. <p><!-- /wp:enlighter/codeblock --></p>
  2911. <p><!-- wp:paragraph --></p>
  2912. <p>However, since instance main methods and implicit classes is a preview language feature, you should add the flag <code>--enable-preview</code> with <code>--source 22</code> with these commands, as follows:</p>
  2913. <p><!-- /wp:paragraph --></p>
  2914. <p><!-- wp:enlighter/codeblock --></p>
  2915. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">C:\code\MyHelloWorldProject\java --enable-preview --source 22 HelloWorld.java
  2916. </pre>
  2917. <p><!-- /wp:enlighter/codeblock --></p>
  2918. <p><!-- wp:paragraph --></p>
  2919. <p>Sooner or later, you might switch to using an IDE to write your code. If you wish to use IntelliJ IDEA for creating instance main methods, here’s a quick list of steps to follow. Create a new Java project, select the build system as IntelliJ (so you could use Java compiler and runtime tools), create a new file, say, HelloWorld.java with your instance main method and set the properties to use Java 22, before you run your code, as shown in the following gif (It could save you from typing out the compilation/ execution commands on the command prompt each time you want to execute your code):</p>
  2920. <p><!-- /wp:paragraph --></p>
  2921. <p><!-- wp:image {"id":16062} --></p>
  2922. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/02/create-new-project2.gif" alt="" class="wp-image-16062"/></figure>
  2923. <p><!-- /wp:image --></p>
  2924. <p><!-- wp:paragraph --></p>
  2925. <p>Are you wondering if it would be better to create a &#8216;Java class&#8217; instead of a &#8216;File&#8217; in the &#8216;src&#8217; folder? The option of selecting a Java class would generate the body of a bare minimum class, say, <code>public class HelloWorld { }</code>. Since we are trying to avoid unnecessary keywords in the beginning, I recommended creating a new &#8216;File&#8217; which wouldn’t include any code.</p>
  2926. <p><H3>What else can main() do apart from printing messages to the console?</H3></p>
  2927. <p>As included in <a href="https://blog.jetbrains.com/idea/2024/02/helloworld-and-main-meet-minimalistic/">my detailed post on this topic</a>, I included multiple hand-on examples to show what you could achieve via just the <code>main()</code> method:</p>
  2928. <ul>
  2929. <li><a href="https://blog.jetbrains.com/idea/2024/02/helloworld-and-main-meet-minimalistic/#example-1.-variable-declarations,-assignments-and-simple-calculations">Example 1. Variable declarations, assignments and simple calculations</a></li>
  2930. <li><a href="https://blog.jetbrains.com/idea/2024/02/helloworld-and-main-meet-minimalistic/#example-2.-print-patterns,-such-as,-big-letters-using-a-specified-character">Example 2. Print patterns, such as, big letters using a specified character</a></li>
  2931. <li><a href="https://blog.jetbrains.com/idea/2024/02/helloworld-and-main-meet-minimalistic/#example-3.-animating-multiline-text-–-one-word-at-a-time">Example 3. Animating multiline text – one word at a time</a></li>
  2932. <li><a href="https://blog.jetbrains.com/idea/2024/02/helloworld-and-main-meet-minimalistic/#example-4.-data-structure-problems">Example 4. Data structure problems</a></li>
  2933. <li><a href="https://blog.jetbrains.com/idea/2024/02/helloworld-and-main-meet-minimalistic/#example-5.-text-based-hangman-game">Example 5. Text based Hangman game</a></li>
  2934. <p>The idea to include multiple examples as listed above is to demonstrate the power of sequence, condition and iteration all of which can be included in the <code>main()</code> method, to build good programming foundations with problem solving skills. By using the run command or the icon to run and execute their code in IntelliJ IDEA, new programmers reduce another step when getting started.</p>
  2935. <h3 class="wp-block-heading">Changing an implicit class to a regular class</h3>
  2936. <p><!-- /wp:heading --></p>
  2937. <p><!-- wp:paragraph --></p>
  2938. <p>When you are ready to level up and work with other concepts like user defined classes, you could also covert the implicit classes and code that we used in the previous examples, to regular classes, as shown below:</p>
  2939. <p><!-- /wp:paragraph --></p>
  2940. <p><!-- wp:image {"id":16062} --></p>
  2941. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/02/convert-to-regular-class.gif" alt="" class="wp-image-16062"/></figure>
  2942. <p><!-- /wp:image --></p>
  2943. <h3 class="wp-block-heading">What happens when you create a source code file with method main(), but no class declaration?</h3>
  2944. <p><!-- /wp:heading --></p>
  2945. <p><!-- wp:paragraph --></p>
  2946. <p>Behind the scenes, the Java compiler creates an implicit top level class, with a no-argument constructor, so that these classes don’t need to be treated in a way that is different to the regular classes.</p>
  2947. <p><!-- /wp:paragraph --></p>
  2948. <p><!-- wp:paragraph --></p>
  2949. <p>Here’s a gif that shows a decompiled class for you for the source code file AnimateText.java:</p>
  2950. <p><!-- /wp:paragraph --></p>
  2951. <p><!-- wp:image {"id":16062} --></p>
  2952. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/02/decompile.gif" alt="" class="wp-image-16062"/></figure>
  2953. <h3 class="wp-block-heading">Variations of the main method in the implicit class</h3>
  2954. <p><!-- /wp:heading --></p>
  2955. <p><!-- wp:paragraph --></p>
  2956. <p>As we are aware, a method can be overloaded. Does that imply an implicit class can define multiple main methods? If yes, which one of them qualifies as the ‘main’ method?<br />This is an interesting question. First of all, know that you can’t define a static and non-static main method with the same signature, that is, with the same method parameters. The following method are considered valid main() methods in an implicit class:</p>
  2957. <p><!-- /wp:paragraph --></p>
  2958. <p><!-- wp:enlighter/codeblock --></p>
  2959. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public static void main(String args[]) {}
  2960. public void main(String args[]) {}
  2961. public static void main() {}
  2962. static void main() {}
  2963. public void main() {}
  2964. void main() {}
  2965. </pre>
  2966. <p><!-- /wp:enlighter/codeblock --></p>
  2967. <p><!-- wp:paragraph --></p>
  2968. <p>If there is no valid main method detected, IntelliJ IDEA could add one for you, as shown in the following gif:</p>
  2969. <p><!-- /wp:paragraph --></p>
  2970. <p><!-- wp:image {"id":16062} --></p>
  2971. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/02/create-a-main-method.gif" alt="" class="wp-image-16062"/></figure>
  2972. <p><!-- /wp:image --></p>
  2973. <h3 class="wp-block-heading">Educators could use this feature to introduce other concepts to the students in an incremental way</h3>
  2974. <p><!-- /wp:heading --></p>
  2975. <p><!-- wp:paragraph --></p>
  2976. <p>If you are an educator, you could introduce your students to other commonly used programming practices, such as creating methods- that is delegating part of your code to another method and calling it from the main method. You could also talk about passing values vs. variables to these methods.</p>
  2977. <p><!-- /wp:paragraph --></p>
  2978. <p><!-- wp:paragraph --></p>
  2979. <p>The following gif shows how to do it:</p>
  2980. <p><!-- /wp:paragraph --></p>
  2981. <p><!-- wp:image {"id":16062} --></p>
  2982. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/02/extract-method-inline-variables.gif" alt="" class="wp-image-16062"/></figure>
  2983. <p><H2>Statements before super() &#8211; a preview language feature</H2></p>
  2984. <p>Typically, we create alternative solutions for tasks that are necessary, but not officially permitted. For instance, executing statements before <code>super()</code> in a derived class constructor was not officially allowed, even though it was important for, say, validating values being passed to the base class constructor. A popular workaround involved creating static methods to validate values and then calling these methods on the arguments of <code>super()</code>. Though this approach worked well, it could make the code look complicated. This is changing with <a href="https://openjdk.org/jeps/447" target="_blank" rel="noopener">Statements before super()</a>, a preview language feature in Java 22.</p>
  2985. <p>By using this feature, you can opt for a more direct approach, that is, drop the workaround of creating static methods, and execute code that  validates arguments, just before calling <code>super()</code>. Terms and conditions still apply, such as, not accessing instance members of a derived class before execution of <code>super()</code> completes.</p>
  2986. <p><H3>An example &#8211; Validating values passed to super() in a derived class constructor</H3><br />
  2987. Imagine you need to create a class, say, <code>IndustryElement</code>, that extends class <code>Element</code>, which is defined as follows:</p>
  2988. <pre class="EnlighterJSRAW" data-enlighter-language="">
  2989. public class Element {
  2990.   int atomicNumber;
  2991.   Color color;
  2992.  
  2993.   public Element(int atomicNumber, Color color) {
  2994.       if (color == null)
  2995.           throw new IllegalArgumentException(&quot;color is null&quot;);
  2996.       this.atomicNumber = atomicNumber;
  2997.       this.color = color;
  2998.   }
  2999.    // rest of the code
  3000. }</pre>
  3001. <p>The constructor of the class <code>Element</code> misses checking if the <code>atomicNumber</code> is in the range of 1-118 (all known elements have atomic numbers between 1 to 118). Often the source code of a base class is not accessible or open for modification. How would you validate the values passed to <code>atomicNumber</code> in the constructor of class <code>IndustryElement</code>?</p>
  3002. <p>Until Java 21, no statements were allowed to execute before <code>super()</code>. Here’s one of the ways we developers found a workaround by defining and calling static methods (static methods belong to a class and not to instances and can be executed before any instance of a class exists):</p>
  3003. <pre class="EnlighterJSRAW" data-enlighter-language="">
  3004. public class IndustryElement extends Element{
  3005.   private static final int MIN_ATOMIC_NUMBER = 1;
  3006.   private static final int MAX_ATOMIC_NUMBER = 118;
  3007.  
  3008.   public IndustryElement(int atomicNumber, Color color) {
  3009.       super(checkRange(atomicNumber, MIN_ATOMIC_NUMBER , MAX_ATOMIC_NUMBER), color);
  3010.   }
  3011.  
  3012.   private static int checkRange(int value, int lowerBound, int upperBound) {
  3013.       if (value &lt; lowerBound || value &gt; upperBound)
  3014.           throw new IllegalArgumentException(&quot;Atomic number out of range&quot;);
  3015.       return value;
  3016.   }
  3017. }</pre>
  3018. <p>Starting Java 22, you could inline the contents of your static method in the constructor for your derived class, as shown in the following gif:</p>
  3019. <figure class="wp-block-image alignnone wp-image-16062"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/02/inline-method-super.gif" alt="" /></figure>
  3020. <p>Here’s the resultant code for your reference:</p>
  3021. <pre class="EnlighterJSRAW" data-enlighter-language="">
  3022. public class IndustryElement extends Element{
  3023.    private static final int MIN_ATOMIC_NUMBER = 1;
  3024.    private static final int MAX_ATOMIC_NUMBER = 118;
  3025.  
  3026.    public IndustryElement(int atomicNumber, Color color) {
  3027.        if (atomicNumber &lt; MIN_ATOMIC_NUMBER || atomicNumber &gt; MAX_ATOMIC_NUMBER)
  3028.            throw new IllegalArgumentException(&quot;Atomic number out of range&quot;);
  3029.        super(atomicNumber, color);
  3030.    }
  3031. }</pre>
  3032. <p><H3>Where else would you use this feature?</H3><br />
  3033. If you are new to this feature, I&#8217;d recommend that you check out my detailed blog post, <a href="https://blog.jetbrains.com/idea/2024/02/constructor-makeover-in-java-22/">Constructor Makeover in Java 22</a>, in which I&#8217;ve covered this feature in detail using the following examples:</p>
  3034. <ul>
  3035. <li><a href="https://blog.jetbrains.com/idea/2024/02/constructor-makeover-in-java-22/#example-2-–-base-class-constructor-parameters-that-use-annotations-for-validations">Example 2 – base class constructor parameters that use annotations for validations</a></li>
  3036. <li><a href="https://blog.jetbrains.com/idea/2024/02/constructor-makeover-in-java-22/#example-3-–-transforming-variable-values-received-in-a-derived-class-constructor,-before-calling-a-base-class-constructor.">Example 3 – Transforming variable values received in a derived class constructor, before calling a base class constructor.</a></li>
  3037. <li><a href="https://blog.jetbrains.com/idea/2024/02/constructor-makeover-in-java-22/#example-4-–-executing-statements-before-this-in-constructor-of-records">Example 4 – Executing statements before this() in constructor of Records</a></li>
  3038. <li><a href="https://blog.jetbrains.com/idea/2024/02/constructor-makeover-in-java-22/#example-5-–-executing-statements-before-this-in-enum-constructors">Example 5 – Executing statements before this() in Enum constructors</a></li>
  3039. <li><a href="https://blog.jetbrains.com/idea/2024/02/constructor-makeover-in-java-22/#example-6-–-executing-statements-before-this-in-classes">Example 6 – Executing statements before this() in classes</a></li>
  3040. </ul>
  3041. <p><H3>How does it work behind the scenes?</H3><br />
  3042. The language syntax has been relaxed but it doesn’t change or impact the internal JVM instructions. There are no changes to the JVM instructions for this new feature because the order of execution of the constructors still remains unchanged &#8211; from base class to a derived class. Also, this feature still doesn&#8217;t allow you to use members of a derived class instance, until <code>super()</code> executes.</p>
  3043. <p>Let’s access and compare the instruction set of the constructor of class <code>IndustryElement</code>, before and after its modification &#8211; one that can execute statements before <code>super()</code> and the one that doesn’t. To do so, use the following command:</p>
  3044. <pre class="EnlighterJSRAW" data-enlighter-language="">
  3045. javap -c IndustryElement.class</pre>
  3046. <p>Here’s the instruction set for the constructor that doesn’t explicitly execute statements before <code>super()</code> and calls static methods to validate range of atomic number:</p>
  3047. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/02/instructions-1.png" alt="" /></figure>
  3048. <p>Here’s instruction set for the constructor that explicitly executes statements before super() to validate range of atomic number:</p>
  3049. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/02/instructions-2.png" alt="" /></figure>
  3050. <p>The most important point to note here is that in both the cases, the constructor of the base class, that is, <code>Element</code> is called, after the execution of all other statements. Essentially, it means, you are still doing the same thing, it is just packaged in a way that makes things easier for you.</p>
  3051. <p>I understand it is difficult to remember what each of these instruction codes means. Access the following link and search for the instruction code and following the above instructions set would be a breeze:</p>
  3052. <p><a href="https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-6.html#jvms-6.5.aload_n" target="_blank" rel="noopener">https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-6.html#jvms-6.5.aload_n</a></p>
  3053. <p><H3>Can you execute ‘any’ statements before calling super()?</H3></p>
  3054. <p>No. If the statements before <code>super()</code> try to access instance variables or execute methods of your derived class, your code won’t compile. For example, if you change the static <code>checkRange()</code> method to an instance method, your code won’t compile, as shown below:</p>
  3055. <figure class="wp-block-image alignnone wp-image-16062"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/02/instance-method-error.gif" alt="" /></figure>
  3056. <p><H2>Unnamed Variables and Patterns</H2></p>
  3057. <p>Starting Java 22, using <a href="https://openjdk.org/jeps/456" target="_blank" rel="noopener">Unnamed Variables &amp; Patterns</a> you can mark unused local variables, patterns and pattern variables to be ignored, by replacing their names (or their types and names) with an underscore, that is, <code>_</code>. Since such variables and patterns no longer have a name, they are referred to as Unnamed variables and patterns. Ignoring unused variables would reduce the time and energy anyone would need to understand a code snippet. In the future, this could prevent errors :-). This language feature doesn’t apply to instance or class variables.</p>
  3058. <p>Are you wondering if replacing unused variables with <code>_</code> is always a good idea, or do they imply code smells and should you consider refactoring your codebase to remove them? Those are good questions to ask. If you are new to this topic, I&#8217;d recommend you to check out my detailed blog post: <a href="https://blog.jetbrains.com/idea/2024/03/drop-the-baggage-use-_-for-unnamed-local-variables-and-patterns-in-java-22/">Drop the Baggage: Use &#8216;_&#8217; for Unnamed Local Variables and Patterns in Java 22</a> to find out answer to this question.</p>
  3059. <h3>IntelliJ IDEA Configuration</h3>
  3060. <p>Since this is not a preview language feature, set Language Level in your Project Settings to ‘22 &#8211; Unnamed variables and patterns’ on both the Project and Modules tab, as shown in the below settings screenshot:</p>
  3061. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/config1.png" alt="" /></figure>
  3062. <h3>A quick example</h3>
  3063. <p>The following gif gives a sneak peek into how an unused local variable, connection, is detected by IntelliJ IDEA, and could be replaced with an underscore, that is, <code>_</code>.</p>
  3064. <figure class="wp-block-image"><img decoding="async" class="wp-image-16062" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/unused-variable-trailer.gif" alt="" /></figure>
  3065. <p>The modified code shown in the preceding gif makes it clear that the local variable defined in the try-with-resources statement is unused, making it concise and easier to understand.</p>
  3066. <h3>Unused Patterns and Pattern variables in switch constructs</h3>
  3067. <p>Imagine you defined a sealed interface, say, <code>GeometricShape</code>, and records to represent shapes, such as, <code>Point</code>, <code>Line</code>, <code>Triangle</code>, <code>Square</code>, as shown in the following code:</p>
  3068. <pre class="EnlighterJSRAW" data-enlighter-language="">
  3069. sealed interface GeometricShape {}
  3070. record Point   ( int x,
  3071.                 int y)         implements GeometricShape { }
  3072. record Line    ( Point start,
  3073.                 Point end)     implements GeometricShape { }
  3074. record Triangle( Point pointA,
  3075.                 Point pointB,
  3076.                 Point PointC)  implements GeometricShape { }
  3077. record Square  ( Point pointA,
  3078.                 Point pointB,
  3079.                 Point PointC,
  3080.                 Point pointD)  implements GeometricShape { }</pre>
  3081. <p>Now assume you need a method that accepts an instance of <code>GeometricShape</code> and returns its area. Since <code>Point</code> and a <code>Line</code> are considered one-dimensional shapes, they wouldn’t have an area. Following is one of the ways to define such method that calculates and returns area:</p>
  3082. <pre class="EnlighterJSRAW" data-enlighter-language="">
  3083. int calcArea(GeometricShape figure) {
  3084.    return switch (figure) {
  3085.        case Point    (int x, int y)                        -&gt; 0;
  3086.        case Line     (Point a, Point b)                    -&gt; 0;
  3087.        case Triangle (Point a, Point b, Point c)           -&gt; areaTriangle(a, b, c);
  3088.        case Square   (Point a, Point b, Point c, Point d)  -&gt; areaSquare  (a, b, c, d);
  3089.    };
  3090. }</pre>
  3091. <p>In the previous example, the patterns <code>int x</code>, <code>int y</code>, <code>Point a</code> and <code>Point B</code> (for case label Line) remain unused as detected by IntelliJ IDEA. These could be replaced by an <code>_</code>. Also, since all the record components of the case Point remain unused, it could be replaced as <code>Point _</code>. This could also allow us to merge the first and second case labels. All of these steps are shown in the following gif:</p>
  3092. <figure class="wp-block-image"><img decoding="async" class="wp-image-16062" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/unused-pattern-variables1.gif" alt="" /></figure>
  3093. <p>Here’s the modified code for your reference:</p>
  3094. <pre class="EnlighterJSRAW" data-enlighter-language="">
  3095. int calcArea(GeometricShape figure) {
  3096.    return switch (figure) {
  3097.        case Point _, Line _                                -&gt; 0;  
  3098.        case Triangle (Point a, Point b, Point c)           -&gt; areaTriangle(a, b, c);
  3099.        case Square   (Point a, Point b, Point c, Point d)  -&gt; areaSquare  (a, b, c, d);
  3100.    };
  3101. }</pre>
  3102. <p>In the preceding example, you can’t delete the pattern variables even if they are unused. The code must include the cases when the instance passed to the method <code>calcArea()</code> is of type <code>Point</code> and <code>Line</code>, so that it could return 0 for them.</p>
  3103. <h3>Unused Patterns or variables with nested records</h3>
  3104. <p>This feature also comes in quite handy for nested records with multiple unused patterns or pattern variables, as demonstrated using the following example code:</p>
  3105. <pre class="EnlighterJSRAW" data-enlighter-language="">
  3106. record Name       (String fName, String lName) { }
  3107. record PhoneNumber(String areaCode, String number) { }
  3108. record Country    (String countryCode, String countryName) { }
  3109. record Passenger  (Name name,
  3110.                   PhoneNumber phoneNumber,
  3111.                   Country from,
  3112.                   Country destination) { }
  3113.  
  3114. public class GeoMaps {
  3115.    boolean checkFirstNameAndCountryCodeAgain (Object obj) {
  3116.        if (obj instanceof Passenger(Name (String fName, _),
  3117.                                     _,
  3118.                                     _,
  3119.                                     Country (String countryCode, _) )) {
  3120.  
  3121.            if (fName != null &amp;&amp; countryCode != null) {
  3122.                return fName.startsWith(&quot;Simo&quot;) &amp;&amp; countryCode.equals(&quot;PRG&quot;);
  3123.            }
  3124.        }
  3125.        return false;
  3126.    }
  3127. }</pre>
  3128. <p>In the preceding code, since the if condition in the method <code>checkFirstNameAndCountryCodeAgain</code> uses only two pattern variables, others could be replaced using <code>_</code>; it reduced the noise in the code too.</p>
  3129. <p><H3>Where else can you use this feature?</H3><br />
  3130. Checkout my detailed detailed blog post: <a href="https://blog.jetbrains.com/idea/2024/03/drop-the-baggage-use-_-for-unnamed-local-variables-and-patterns-in-java-22/">Drop the Baggage: Use &#8216;_&#8217; for Unnamed Local Variables and Patterns in Java 22</a> to learn more about other use cases where this feature can be used:</p>
  3131. <ul>
  3132. <li><a href="https://blog.jetbrains.com/idea/2024/03/drop-the-baggage-use-_-for-unnamed-local-variables-and-patterns-in-java-22/#3.-requirements-change,-but-you-need-side-effects-of-constructs-like-an-enhanced-for-loop"> Requirements change, but you need side effects of constructs like an enhanced for-loop</a></li>
  3133. <li><a href="https://blog.jetbrains.com/idea/2024/03/drop-the-baggage-use-_-for-unnamed-local-variables-and-patterns-in-java-22/#4.-unused-parameters-in-exception-handlers;-whose-signature-can’t-be-modified">Unused parameters in exception handlers; whose signature can’t be modified</a></li>
  3134. <li><a href="https://blog.jetbrains.com/idea/2024/03/drop-the-baggage-use-_-for-unnamed-local-variables-and-patterns-in-java-22/#5.-unused-auto-closeable-resources-in-try-with-resources-statements">Unused auto-closeable resources in try-with-resources statements</a></li>
  3135. </ul>
  3136. <p>It isn&#8217;t advisable to use this feature without realising if an unused variable or pattern is a code smell or not. I used these examples to show that at times it might be better to refactor your code to get rid of the unused variable instead of just replacing it with an underscore, that is, <code>_</code>.</p>
  3137. <ul>
  3138. <li><a href="https://blog.jetbrains.com/idea/2024/03/drop-the-baggage-use-_-for-unnamed-local-variables-and-patterns-in-java-22/#1.-unused-lambda-parameter">Unused lambda parameter</a></li>
  3139. <li><a href="https://blog.jetbrains.com/idea/2024/03/drop-the-baggage-use-_-for-unnamed-local-variables-and-patterns-in-java-22/#2.-methods-with-multiple-responsibilities">Methods with multiple responsibilities</a></li>
  3140. </ul>
  3141. <p><H2>Preview Features</H2></p>
  3142. <p><!-- /wp:heading --></p>
  3143. <p><!-- wp:paragraph --></p>
  3144. <p>&#8216;String Templates&#8217;, &#8216;Implicitly Declared Classes and Instance Main Methods&#8217; and &#8216;Statements before super()&#8217; are preview language features in Java 22. With Java’s new release cadence of six months, new language features are released as preview features. They may be reintroduced in later Java versions in the second or more preview, with or without changes. Once they are stable enough, they may be added to Java as a standard language feature.</p>
  3145. <p><!-- /wp:paragraph --></p>
  3146. <p><!-- wp:paragraph --></p>
  3147. <p>Preview language features are complete but not permanent, which essentially means that these features are ready to be used by developers, although their finer details could change in future Java releases depending on developer feedback. Unlike an API, language features can’t be deprecated in the future. So, if you have feedback about any of the preview language features, feel free to share it on the JDK mailing list (free registration required).</p>
  3148. <p><!-- /wp:paragraph --></p>
  3149. <p><!-- wp:paragraph --></p>
  3150. <p>Because of how these features work, IntelliJ IDEA is committed to only supporting preview features for the current JDK. Preview language features can change across Java versions, until they are dropped or added as a standard language feature. Code that uses a preview language feature from an older release of the Java SE Platform might not compile or run on a newer release.</p>
  3151. <p><H2>Summary</H2></p>
  3152. <p>In this blog post, I covered four Java 22 features &#8211; <a href="https://openjdk.org/jeps/459" target="_blank" rel="noopener">String Templates</a>, <a href="https://openjdk.org/jeps/463" target="_blank" rel="noopener">Implicitly Declared Classes and Instance Main Methods</a>, <a href="https://openjdk.org/jeps/447" target="_blank" rel="noopener">Statements before super()</a>, and <a href="https://openjdk.org/jeps/456" target="_blank" rel="noopener">Unnamed variable and patterns</a>.</p>
  3153. <p>String Templates is a great addition to Java. Apart from helping developers to work with strings that combine string constants and variables, they provide a layer of security. Custom String templates can be created with ease to accomplish multiple tasks, such as, to decipher letter combinations, either ignoring them or replacing them for added security.</p>
  3154. <p>Java language designers are reducing the ceremony that is required to write the first HelloWorld code for Java students, by introducing implicitly declared classes and instance main methods. New students can start with bare minimum main() method, such as, void main() and build strong programming foundation by polishing their skills with basics like sequence, selection and iteration.</p>
  3155. <p>In Java 22, the feature Statements before super() lets you execute code before calling super() in your derived class constructors, this() in your records or enums, so that you could validate the method parameters, or transform values, as required. This avoids creating workarounds like creating static methods and makes your code easier to read and understand. This feature doesn’t change how constructors would operate now vs. how they operated earlier – the JVM instructions remain the same.</p>
  3156. <p>Unnamed variables are local to a code construct, they don’t have a name, and they are represented by using an underscore, that is, <code>_</code>. They can’t be passed to methods, or used in expressions. By replacing unused local variables in a code base with <code>_</code> their intention is conveyed very clearly. It clearly communicates to anyone reading a code snippet that the variable is not used elsewhere. Until now, this intention could only be communicated via comments, which, unfortunately, all developers don’t write.</p>
  3157. <p>Happy Coding!</p>]]></content:encoded>
  3158.                    <language>
  3159.                        <code><![CDATA[zh-hans]]></code>
  3160.                        <url>https://blog.jetbrains.com/zh-hans/idea/2024/03/java-22-and-intellij-idea/</url>
  3161.                    </language>
  3162.                 </item>
  3163. <item>
  3164. <title>IntelliJ IDEA 2024.1 Beta 2 Is Out!</title>
  3165. <link>https://blog.jetbrains.com/idea/2024/03/intellij-idea-2024-1-beta-2/</link>
  3166. <dc:creator><![CDATA[Maria Kosukhina]]></dc:creator>
  3167. <pubDate>Mon, 18 Mar 2024 15:24:33 +0000</pubDate>
  3168. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2024/03/Blog_Featured_image_IntelliJIDEA-2024.1-Beta.png</featuredImage> <category><![CDATA[eap]]></category>
  3169. <category><![CDATA[2024-1-eap]]></category>
  3170. <category><![CDATA[intellij-idea-2024-1]]></category>
  3171. <category><![CDATA[intellij-idea-2024-1-eap]]></category>
  3172. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=456598</guid>
  3173.  
  3174. <description><![CDATA[IntelliJ IDEA 2024.1 Beta 2 has just arrived! Packed with all of the latest enhancements introduced during the Early Access Program, this build is now accessible via our website, the free Toolbox App, or through snaps for Ubuntu. Download IntelliJ IDEA 2024.1 Beta 2 As we approach the final stages of development and testing for [&#8230;]]]></description>
  3175. <content:encoded><![CDATA[
  3176. <p>IntelliJ IDEA 2024.1 Beta 2 has just arrived! Packed with all of the latest enhancements introduced during the Early Access Program, this build is now accessible via our <a href="https://www.jetbrains.com/idea/nextversion/" target="_blank" rel="noopener">website</a>, the free <a href="https://www.jetbrains.com/toolbox-app/" target="_blank" rel="noopener">Toolbox App</a>, or through snaps for Ubuntu.</p>
  3177.  
  3178.  
  3179.  
  3180. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="1280" height="720" src="https://blog.jetbrains.com/wp-content/uploads/2024/03/Blog_Featured_image_IntelliJIDEA-2024.1-Beta.png" alt="" class="wp-image-454484"/></figure>
  3181.  
  3182.  
  3183.  
  3184. <p align="center"><a class="jb-download-button" href="https://www.jetbrains.com/idea/nextversion/" target="_blank" rel="noopener">Download IntelliJ IDEA 2024.1 Beta 2</a></p>
  3185.  
  3186.  
  3187.  
  3188. <p>As we approach the final stages of development and testing for version 2024.1, this latest build represents a significant stride towards delivering a stable and efficient release.</p>
  3189.  
  3190.  
  3191.  
  3192. <p>With the Early Access Program winding down, there&#8217;s still time to explore the new features introduced since its launch. We invite you to learn about these latest updates in the <a href="https://blog.jetbrains.com/idea/tag/2024-1-eap/">dedicated section</a> of our blog and then try them out while working with the IntelliJ IDEA 2024.1 Beta 2 build. Let us know if you encounter any <a href="https://youtrack.jetbrains.com/issues/IDEA" data-type="link" data-id="https://youtrack.jetbrains.com/issues/IDEA" target="_blank" rel="noopener">issues</a> – your feedback is vital when it comes to shaping the final version.</p>
  3193.  
  3194.  
  3195.  
  3196. <p>Stay tuned for the official release! Thanks for being a part of perfecting IntelliJ IDEA for developers worldwide.</p>
  3197.  
  3198.  
  3199.  
  3200. <p>Happy developing!</p>
  3201. ]]></content:encoded>
  3202. </item>
  3203. </channel>
  3204. </rss>
  3205.  
Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda