<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mohamed Taman on foojay.io - Friends of OpenJDK</title><link>https://foojayio.github.io/website/today/author/mohamed-taman/</link><description>Articles written by Mohamed Taman on foojay.io - Friends of OpenJDK</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 19 Sep 2023 05:27:07 +0000</lastBuildDate><atom:link href="https://foojayio.github.io/website/today/author/mohamed-taman/index.xml" rel="self" type="application/rss+xml"/><item><title>Foojay Podcast #28: Java 21 Has Arrived!</title><link>https://foojayio.github.io/website/today/foojay-podcast-28/</link><pubDate>Tue, 19 Sep 2023 05:27:07 +0000</pubDate><guid>https://foojayio.github.io/website/today/foojay-podcast-28/</guid><description>&lt;p&gt;Since 2018, we get a new version of Java every 6 months.&lt;/p&gt;
&lt;p&gt;And &lt;a href="https://foojayio.github.io/website/today/java-21-is-available-today-and-its-quite-the-update/"&gt;version 21, released during today, is a long-term support version&lt;/a&gt;
 that can be used for many years.&lt;/p&gt;
&lt;p&gt;It also brings a lot of new features and improvements in both the language and the runtime.&lt;/p&gt;
&lt;p&gt;Actually, there are so many that we&amp;rsquo;ll probably not get all of them discussed in this podcast!&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see what our experts find the most important facts we need to know about Java 21.&lt;/p&gt;</description></item><item><title>Hidden and Not-So-Hidden Gems In Java 20</title><link>https://foojayio.github.io/website/today/hidden-and-not-so-hidden-gems-in-java-20/</link><pubDate>Wed, 03 May 2023 14:32:45 +0000</pubDate><guid>https://foojayio.github.io/website/today/hidden-and-not-so-hidden-gems-in-java-20/</guid><description>&lt;p&gt;&lt;strong&gt;Let&amp;rsquo;s see the preview and incubator JEPs in Java 20, as well as many smaller enhancements, bug fixes, and deprecations.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;March 2023 marked the latest feature release of the Java platform, which was delivered on time through the six-month release cadence as Java 20. Like Java 19, which became generally available in September 2022, Java 20 targeted JEPs&amp;mdash;seven, in this case&amp;mdash;from the &lt;a href="https://openjdk.org/projects/panama/" target="_blank" rel="noopener noreferrer"&gt;Panama&lt;/a&gt;
, &lt;a href="https://openjdk.org/projects/amber/" target="_blank" rel="noopener noreferrer"&gt;Amber&lt;/a&gt;
, and &lt;a href="https://wiki.openjdk.org/display/loom" target="_blank" rel="noopener noreferrer"&gt;Loom&lt;/a&gt;
 projects.&lt;/p&gt;
&lt;p&gt;I am using the Java 20 jshell tool to demonstrate the code in this article. To follow along, &lt;a href="https://foojayio.github.io/website/download/"&gt;download JDK 20&lt;/a&gt;
, fire up your terminal, check your version, and run jshell. Note that you might see a newer version of the JDK; that&amp;rsquo;s okay.&lt;/p&gt;</description></item><item><title>Running Single-File Java Source Code Without Compiling (Part 2)</title><link>https://foojayio.github.io/website/today/running-single-file-java-source-code-without-compiling-part-2/</link><pubDate>Thu, 10 Sep 2020 15:54:17 +0000</pubDate><guid>https://foojayio.github.io/website/today/running-single-file-java-source-code-without-compiling-part-2/</guid><description>&lt;p&gt;&lt;a href="https://foojayio.github.io/website/blog/running-single-file-java-source-code-without-compiling-part-1/"&gt;Let&amp;rsquo;s continue from part 1 of this series&lt;/a&gt;
, by looking at JEP 330, Launch Single-File Source-Code Programs, which is one of the new features introduced in the OpenJDK 11 release. This feature allows you to execute a Java source code file directly using the &lt;code&gt;java&lt;/code&gt; interpreter. The source code is compiled in memory and then executed by the interpreter, without producing a .class file on disk.&lt;/p&gt;
&lt;p&gt;However, this feature is limited to code that resides in a single source file. You cannot add additional source files to be compiled in the same run.&lt;/p&gt;</description></item><item><title>Running Single-File Java Source Code Without Compiling (Part 1)</title><link>https://foojayio.github.io/website/today/running-single-file-java-source-code-without-compiling-part-1/</link><pubDate>Tue, 08 Sep 2020 08:15:03 +0000</pubDate><guid>https://foojayio.github.io/website/today/running-single-file-java-source-code-without-compiling-part-1/</guid><description>&lt;p&gt;If you recall the old days, before OpenJDK 11, say you have a &lt;code&gt;HelloUniverse.java&lt;/code&gt; source file that contains a class definition and a static main method, which prints out as a single line of text to the terminal, like the following:&lt;/p&gt;
&lt;pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""&gt;public class HelloUniverse{
 public static void main(String[] args) { 
 System.out.println("Hello foojay!");
 }
}&lt;/pre&gt;
&lt;p&gt;Normally to run this class, first, you would need to compile it, using a Java compiler (&lt;code&gt;javac&lt;/code&gt;), which would result in a &lt;code&gt;HelloUniverse.class&lt;/code&gt; file:&lt;/p&gt;</description></item></channel></rss>