
Java → Java Array Programs
Arrays in java:
- An array is the basic Data Structure that contains items of similar data types.
- There is always an ordering amongst the position of the element.
- It can be accessed with the help of the indices. Java supports 0-indexed arrays. Means the array index starts with 0 in java.
-
We can declare array in java as-
1.int[] arr = new int[size];
2.int[] arr = {1,2,3…};
3.int[] arr = new int[]{1,2,3,...};
Java → Vk api на java. Как сделать кнопки
Вот код:
public class Bot {
public static void main(String[] args) throws ClientException, ApiException, InterruptedException {
TransportClient transportClient = new HttpTransportClient();
VkApiClient vk = new VkApiClient(transportClient);
Random random = new Random()…

Qt → Взаимодействие различных dll библиотек С++, C#, java
Добрый день.
Почему работая на С++, нельзя полноценно использовать dll , написанных на C#, java?
И почему используя другие языки, можно использовать dll , написанных на C++?

Android → A little about memory leaks and ways to avoid them
Memory leaks, garbage collection, Java
What is memory Leaks in Android development ?
The application creates objects, they lie in memory and can not clean out after the completion of its work.
Why is this happening ?
Java has its own means of clearing memory from unused items. This is garbage collection .
The garbage collector marks all objects that can be deleted if they are not referenced. Memory leak - this is just a lost reference, which shows that the object can not be deleted.
The complexity of this bug
is that until a certain time it is not visible and it can not interfere.
There's a good quote from Benjamin Franklin:
“A small leak will sink a great ship."
Memory leaks take the RAM of the application. The amount of raw memory will grow and may one day cause your app to
slow down and crash
. This will lead to user dissatisfaction and most likely the app will be removed...
Java → Отправка Email из Java окружения в Qt
android, c++, Java, Qt, activity
Как выяснилось в этом обсуждении:
Отправка Email из Android в Qt
для отправки Email в Android необходимо делать Java-метод, который и будет отправлять email. И этот Java-метод надо дергать из C++ окружения.
Начал я его делать (за основу можно взять пример взаимодействи…

Java → Several ways to synchronize processes and threads in Java
processes, threads, synchronization, Java
I propose to consider several ways to synchronize threads and processes that are most commonly used in Java. They differ in implementation and use cases. We will consider all methods on interesting examples.
Critical section
This method is suitable for you if:
- parallel threads work with a shared resource;
- requires synchronization between threads, not processes;
This method of synchronization is called resource synchronization ("open – close" synchronization). The idea of this method is that each object in Java has an associated monitor . A monitor is a kind of tool to control access to an object.

Java → Example - Object Pool in Java
Java, пул, шаблоны проектирования
Example of the design pattern An object pool in the Java programming language.

Java → Example - Factory Method in Java
шаблоны проектирования, factory, method, Java, JAVA
In class-based programming, the factory method pattern is a creational pattern that uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created. This is done by creating objects by calling a factory method—either specified in an interface and implemented by child classes, or implemented in a base class and optionally overridden by derived classes—rather than by calling a constructor.

Java → Example - "Builder" design pattern in Java
Java, шаблоны проектирования, Builder
Example of "Builder" design pattern in Java

Java → Example - Abstract Factory in Java
Abstract Factory classes are often implemented with Factory Methods, but they can also be implemented using Prototype. Abstract Factory might store a set of Prototypes from which to clone and return product objects.
- Factory Method: creation through inheritance.
- Prototype: creation through delegation.
- Virtual constructor: defer choice of object to create until run-time.

Fornex
Let me recommend you a great European Fornex hosting.
Fornex has proven itself to be a stable host over the years.
For Django projects I recommend VPS hosting
Following the link you will receive a 5% discount on shared hosting services, dedicated servers, VPS and VPN
View HostingShare on social networks
Donate
The EVILEG project has switched to a non-commercial basis and will develop solely on the enthusiasm of the site creator, the enthusiasm of users, donations and the hosting referral system
Thank you for your support
Available ways to support the project
PayPal
PatreonYandex.MoneyMore