Immutable objects in Java. The main aim and usage.

Stonehenge

What are immutable objects in Java Immutable objects are multifunctional objects that can be used in different parts of the program. For example,  immutable objects can be in a multithreaded environment for working with data. They can also be complex constants that help you avoid unnecessary memory usage and garbage collector overloading. Separately we should mention immutability when working with collections. The main parameters of immutable classes Saying that a class is immutable, it must correspond to the following criteria: Do not provide methods that modify the object’s state. These…

Read More

SOLID principles in Java

solid principles java

This article explains SOLID principles, they are very popular in Object-Oriented Design. We will explore these principles in the context of the Java programming language. SOLID principles of object-oriented design provide the more extendable and clear architecture of your application. The author of SOLID principles is Rober C. Martin. He is the father of a lot of significant publications and books: Clean Code and others. Single Responsibility Principle This principle states that the class must have only one responsibility and it should only have one reason to change. As a…

Read More

Multithreading in Java. Overview of Runnable, Thread, Object.

Многозадачность

Two basic entities represent multithreading in Java. There are processes and threads. Java uses threads more often in multithreading programming. However, there are multi-process applications in Java as well. Processes in Java A process is a self-contained program with an execution environment. Each process has its own memory space. Often the term process refers to an entire application. Communication between processes happens by IPC resources: pipelines or sockets. To create a multi-process application, use the ProcessBuilder class. Threads in Java Thread – often referred to as a lightweight process. Like…

Read More

Java Collection Framework (JCF) – overview of general functionality

Most of the programs use collections in order to represent data. This article will explain more general information about Java Collection Framework. What is it Java Collection Framework? Java Collection Framework is a set of standard interfaces and their implementations. This set has some structure, which we will discuss in detail. Additionally, a couple of words about collections. A collection is a group of elements with similar properties of each item. You can iterate on elements, get by index, remove or add new items to collections. The basic structure of…

Read More

How to earn on photo

Как заработать на фото

Many, having a smartphone with a camera in their hands, are wondering how to make money from photography in the modern world, and the Internet, in turn, offers many opportunities. Let’s take a closer look at several ways to make money from photography. Even pictures of middle quality can bring a good income, for this, you just need to know how to use them correctly. Introduction Overview of the main types of earnings in the photo. How to make money on photo stocks. Ordered photo. Earn by photo viewers. How…

Read More