Surveys & Quizzes
Start learning now
All Articles List
19 July 2018 12:22
More about the garbage collector
Hi! In the last lesson, we first became acquainted with Java's built-in garbage collector and got a rough idea of how it works. It works in the background while your program is running, collecting unnecessary objects that will be deleted later. Thus, it frees up memory that can be used to create new objects in the future ...
20 July 2018 11:58
How not to get lost in time: DateTime and Calendar
Hi! Today we'll start working with a new data type we haven't encountered before, namely, dates. I don't think I need to explain what a date is. :) In principle, we could store the current date and time in an ordinary Java String. But this approach has many drawbacks. The String class is designed to work with text ...
26 July 2022 8:12
Java For Loop
Once Mark Zuckerberg noted that computers are really good in a repetition of commands. It is not simple for a human being, we are getting tired of repetitions the same thing many times in a row, but a computer can do it millions and billions of times and never get bored. If you try to send greetings to all Facebook users...
26 March 2020 16:42
Examples of reflection
Maybe you've encountered the concept of "reflection" in ordinary life. This word usually refers to the process of studying oneself. In programming, it has a similar meaning — it is a mechanism for analyzing data about a program, and even changing the structure and behavior of a program, while the program is running.
12 September 2018 14:42
Reflection API: Reflection. The dark side of Java
Greetings, young Padawan. In this article, I'll tell you about the Force, a power that Java programmers only use in seemingly impossible situations. The dark side of Java is the Reflection API. In Java, reflection is implemented using the Java Reflection API. What is reflection? There is a short, accurate, and popular ...
28 January 2022 11:50
How refactoring works in Java
As you learn how to programming, you spend a lot of time writing code. Most beginning developers believe that this is what they will do in the future. This is partly true, but a programmer's job also includes maintaining and refactoring code. Today we're going to talk about refactoring...
30 August 2022 7:05
Hi! When writing the lessons, I particularly emphasize if there is a specific topic that will be absolutely essential in real work. So, LISTEN UP! The topic we'll cover today will definitely come in handy in all your projects from day one of employment. We're going to talk about logging...
20 January 2020 13:32
Phantom References in Java
Hi! In today's discussion, we'll talk in detail about "phantom references" (PhantomReference) in Java. What kind of references are these? Why are they called "phantom references"? How are they used? As you'll recall, Java has 4 kinds of references...
26 October 2022 10:03
Get Environment variables in Java
Every computer programming language contains variables and constants which allocate unique memory locations, containing information to be used by the programs. Constants values are not changeable but the variable’s value can be changed...
19 December 2022 16:04
The scenario in which a function or method calls itself is known as recursion and such a function or method is known as a recursive function or recursive method. This approach is always used to break complex problems into into a simple and easier to write one. A simple example is to place...
8 April 2020 10:55
Logging: what, how, where, and with what?
Hello everyone in the CodeGym community! Today let's talk about logging: what it is, why it exists, when you should use it, when you should avoid it; what logging implementations are available in Java, and what you should do with all these logging options. And log levels. We'll discuss what appender is...
7 June 2022 13:15
We all know that countries have borders and their own laws. The laws of the country operate within the borders. Also in the country there are, for example, organizations, such as schools or museums, which have their own local rules. They don’t contradict the laws of the country...
Terms and Policy
Accept and close