<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Java on TheJavaGuy Blog 🚀</title>
    <link>/tags/java/</link>
    <description>Recent content in Java on TheJavaGuy Blog 🚀</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2016-2026 Ivan Milosavljević. All Rights Reserved.
</copyright>
    <lastBuildDate>Thu, 25 Dec 2025 00:00:00 +0000</lastBuildDate><atom:link href="/tags/java/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Constructor Rules: Class Must Have at Least One Constructor</title>
      <link>/posts/022-constructor-rules-class-must-have-constructor/</link>
      <pubDate>Thu, 25 Dec 2025 00:00:00 +0000</pubDate>
      <guid>/posts/022-constructor-rules-class-must-have-constructor/</guid>
      <description><![CDATA[<p>In the <a href="/posts/021-the-main-role-of-a-class/">previous article</a>, we&rsquo;ve seen that constructors are the most important members of a class. That conclusion tells us that we must pay special attention to implementing the constructor (or constructors) properly. In this blog post, we&rsquo;ll formulate the first of several constructor rules I believe every class must obey.</p>]]></description><enclosure url="/posts/022-constructor-rules-class-must-have-constructor/cover.png" length="81994" type="image/png" />
    </item>
    
    <item>
      <title>The Main Role of a Class</title>
      <link>/posts/021-the-main-role-of-a-class/</link>
      <pubDate>Thu, 18 Dec 2025 00:00:00 +0000</pubDate>
      <guid>/posts/021-the-main-role-of-a-class/</guid>
      <description><![CDATA[<p>Classes are the bread and butter of Java applications. We write so many of them that sometimes we don&rsquo;t even think of some basic yet fundamental truths. In this blog post we&rsquo;ll take a closer look at the most important role of a class in Java.</p>]]></description><enclosure url="/posts/021-the-main-role-of-a-class/cover.png" length="77548" type="image/png" />
    </item>
    
    <item>
      <title>So what exactly is a whitespace in Java?</title>
      <link>/posts/020-whitespace-in-java/</link>
      <pubDate>Tue, 20 Jun 2023 00:00:00 +0000</pubDate>
      <guid>/posts/020-whitespace-in-java/</guid>
      <description><![CDATA[<p>In our programs we often have to deal with whitespaces, for example to sanitize input we received from users or other applications. With the release of Java 11, there have been some changes to the way whitespace is handled, and it&rsquo;s important for developers to understand these changes in order to avoid potential pitfalls and write efficient, error-free code. In this blog post, we&rsquo;ll take a closer look at whitespace in Java and provide some tips and best practices for working with whitespace in your own Java projects.</p>]]></description><enclosure url="/posts/020-whitespace-in-java/cover.png" length="98022" type="image/png" />
    </item>
    
    <item>
      <title>Adventures of a Java programmer in Character.AI land</title>
      <link>/posts/019-java-programmer-in-character-ai-land/</link>
      <pubDate>Tue, 04 Apr 2023 00:00:00 +0000</pubDate>
      <guid>/posts/019-java-programmer-in-character-ai-land/</guid>
      <description><![CDATA[<p>Usage of artifical intelligence (AI) and large language models (LLM) to write code, comments, documentation etc. is the hottest topic for months now. Most of that attention is directed to the <a href="https://chat.openai.com/" target="_blank" rel="noopener noreferrer">ChatGPT<i class="fas fa-external-link-square-alt ms-1"></i></a> but by no means it&rsquo;s the only game in town. Today I want to explore <a href="https://beta.character.ai/" target="_blank" rel="noopener noreferrer">Character.AI<i class="fas fa-external-link-square-alt ms-1"></i></a> and contrast it to the previous article in which I explored how ChatGPT writes Java code. Character.AI is actually a bunch of differently adjusted models which are known as characters (hence the name) that are claimed to be experts in different skills. The one that caught my attention is called Bug Basher and he claims to be Expert Programmer. Bold claims need bold evidence so let&rsquo;s &ldquo;grill&rdquo; Bug Basher with writing some Java code!</p>]]></description><enclosure url="/posts/019-java-programmer-in-character-ai-land/cover.png" length="100404" type="image/png" />
    </item>
    
    <item>
      <title>Adventures of a Java programmer in ChatGPT land (part 1)</title>
      <link>/posts/018-java-programmer-in-chatgpt-land-part-1/</link>
      <pubDate>Thu, 15 Dec 2022 00:00:00 +0000</pubDate>
      <guid>/posts/018-java-programmer-in-chatgpt-land-part-1/</guid>
      <description><![CDATA[<p>Are you ready to level up your productivity? In this blog post, we&rsquo;ll explore <a href="https://chat.openai.com/" target="_blank" rel="noopener noreferrer">ChatGPT<i class="fas fa-external-link-square-alt ms-1"></i></a>, a powerful and user-friendly language model that can generate Java functions and classes from textual descriptions thus helping you take your Java development to the next level. Read on to learn more!</p>]]></description><enclosure url="/posts/018-java-programmer-in-chatgpt-land-part-1/cover.png" length="78244" type="image/png" />
    </item>
    
    <item>
      <title>3 ways to write higher quality software by using type inference</title>
      <link>/posts/017-3-ways-to-write-higher-quality-software-by-using-type-inference/</link>
      <pubDate>Thu, 08 Dec 2022 00:00:00 +0000</pubDate>
      <guid>/posts/017-3-ways-to-write-higher-quality-software-by-using-type-inference/</guid>
      <description><![CDATA[<p>When hearing the words &ldquo;type inference&rdquo;, most developers probably think of local-variable type inference that arrived in Java 10. But type inference in Java is much older than that. Some sort of it existed even in Java 6, where compilers could infer type parameters of generic constructors! For sure the most famous type inference example is the diamond operator in Java 7. Since the beginning, mere reduction of number of characters used in source code went hand in hand with type inference. But is that its biggest advantage?</p>]]></description><enclosure url="/posts/017-3-ways-to-write-higher-quality-software-by-using-type-inference/cover.png" length="77839" type="image/png" />
    </item>
    
    <item>
      <title>Iterable is beautiful</title>
      <link>/posts/016-iterable-is-beautiful/</link>
      <pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
      <guid>/posts/016-iterable-is-beautiful/</guid>
      <description><![CDATA[<p>Manipulating a group of objects is something every Java developer does almost every day. In those situations, a lot of developers turn to some concrete collections such as <code>ArrayList</code> or <code>HashSet</code> without second thought. More experienced ones try to avoid accepting concrete classes and use some interface like <code>java.util.List</code>, and even more experienced ones turn to <code>java.util.Collection</code>. But sometimes we don&rsquo;t need a collection at all, only the ability to iterate over some objects and for those needs, <code>Iterable</code> is beautiful! Let&rsquo;s see how to improve your programs by using <code>java.lang.Iterable&lt;T&gt;</code>.</p>]]></description><enclosure url="/posts/016-iterable-is-beautiful/cover.png" length="94250" type="image/png" />
    </item>
    
    <item>
      <title>Ultimate guide to sorting strings in Java</title>
      <link>/posts/013-ultimate-guide-to-sorting-strings-in-java/</link>
      <pubDate>Thu, 30 Jun 2022 00:00:00 +0000</pubDate>
      <guid>/posts/013-ultimate-guide-to-sorting-strings-in-java/</guid>
      <description><![CDATA[<p>String manipulation is one of the most fundamental tasks of every developer. We create strings, read them, cut them, join them, pad them and generally do dozens of different processing activities on them. One of the most common of those is sorting. On the first glance, sorting looks like an easy and long solved problem… if you&rsquo;re only dealing with 26 letters of an english alphabet that is. For almost any real-world application, sorting is filled with gotchas and intricacies. In this ultimate guide to string sorting I&rsquo;ll dive deeply and answer questions of sorting strings with numbers, in mixed upper case and lower case, with accented letters etc. Fasten your seatbelts!</p>]]></description><enclosure url="/posts/013-ultimate-guide-to-sorting-strings-in-java/cover.png" length="72183" type="image/png" />
    </item>
    
  </channel>
</rss>

