Java | Вопросы собесов
Сайт: https://easyoffer.ru/ Все каналы: t.me/+xGeAw6ckJ4liYzQy Контакт для рекламы: @easyoffer_adv
Show more📈 Analytical overview of Telegram channel Java | Вопросы собесов
Channel Java | Вопросы собесов (@easy_java_ru) in the Russian language segment is an active participant. Currently, the community unites 11 442 subscribers, ranking 10 866 in the Technologies & Applications category and 57 199 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 11 442 subscribers.
According to the latest data from 25 June, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by -17 over the last 30 days and by 8 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 12.17%. Within the first 24 hours after publication, content typically collects 6.63% reactions from the total number of subscribers.
- Post reach: On average, each post receives 1 392 views. Within the first day, a publication typically gains 758 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 7.
- Thematic interests: Content is focused on key topics such as ставь, void, string, строка, static.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“Сайт: https://easyoffer.ru/
Все каналы: t.me/+xGeAw6ckJ4liYzQy
Контакт для рекламы: @easyoffer_adv”
Thanks to the high frequency of updates (latest data received on 26 June, 2026), the channel maintains relevance and a high level of publication reach. Analytics show that the audience actively interacts with content, making it an important point of influence in the Technologies & Applications category.
example.com/index.html:
Браузер отправляет HTTP-запрос:
GET /index.html HTTP/1.1 Host: example.comВеб-сервер (например, Nginx) получает запрос и отправляет браузеру файл
index.html.
Web Server НЕ обрабатывает логику приложения, он просто отправляет файлы клиенту.
🚩Application Server (сервер приложений)
Обрабатывает динамические запросы (например, авторизацию, платежи, работу с БД).
Выполняет Java-код (Servlet, EJB, Spring, Hibernate).
Может генерировать HTML-страницы на сервере (JSP, Thymeleaf).
Управляет транзакциями и соединениями с базой данных.
Tomcat (самый популярный в мире Java-сервер)
WildFly (JBoss)
GlassFish
WebLogic, WebSphere
Допустим, пользователь заходит на example.com/login:
Браузер отправляет HTTP-запрос:
POST /login HTTP/1.1 Host: example.comСтавь 👍 и забирай 📚 Базу знаний
ApplicationContext) создаётся один экземпляр бина.
@Component
public class MySingletonBean {
public MySingletonBean() {
System.out.println("Создан экземпляр MySingletonBean");
}
}
🟠Два Singleton'а в Spring? Как это возможно?
Есть несколько способов создать два синглтона.
Создание двух контекстов (ApplicationContext)
Spring гарантирует синглтонность только в одном контексте. Если создать два контекста, можно получить два независимых синглтона.
AnnotationConfigApplicationContext context1 = new AnnotationConfigApplicationContext(AppConfig.class);
AnnotationConfigApplicationContext context2 = new AnnotationConfigApplicationContext(AppConfig.class);
MySingletonBean bean1 = context1.getBean(MySingletonBean.class);
MySingletonBean bean2 = context2.getBean(MySingletonBean.class);
System.out.println(bean1 == bean2); // false! Два разных объекта
Определение двух бинов одного типа
Можно создать два разных бина, просто давая им разные имена в конфигурации.
@Configuration
public class AppConfig {
@Bean
public MySingletonBean firstSingleton() {
return new MySingletonBean();
}
@Bean
public MySingletonBean secondSingleton() {
return new MySingletonBean();
}
}
Теперь оба метода создадут разные объекты.
ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
MySingletonBean bean1 = context.getBean("firstSingleton", MySingletonBean.class);
MySingletonBean bean2 = context.getBean("secondSingleton", MySingletonBean.class);
System.out.println(bean1 == bean2); // false
Изменение области (scope) бина
Если изменить область (@Scope), можно получить два экземпляра в одном контексте, но тогда это уже не будет синглтон.
@Component
@Scope("prototype")
public class MyBean {
public MyBean() {
System.out.println("Создан новый экземпляр MyBean");
}
}
Ставь 👍 и забирай 📚 Базу знанийclass Example {
void print(String text) {} // Сигнатура: print(String)
void print(int number) {} // Сигнатура: print(int)
int print(String text, int number) { return 0; } // Сигнатура: print(String, int)
}
🚩Почему сигнатура важна?
🟠Перегрузка методов (Method Overloading)
В одном классе можно создавать методы с одинаковыми именами, но разными сигнатурами.
class MathUtils {
int sum(int a, int b) { return a + b; } // sum(int, int)
double sum(double a, double b) { return a + b; } // sum(double, double)
}
🟠Переопределение методов (Method Overriding)
При переопределении метода (в наследовании) сигнатура ДОЛЖНА быть такой же.
class Parent {
void show() {} // Сигнатура: show()
}
class Child extends Parent {
@Override
void show() {} // ✅ Сигнатура совпадает, корректное переопределение
}
🚩Ошибки, связанные с сигнатурой
Ошибка: Возвращаемый тип НЕ влияет на сигнатуру
class Test {
int method(int x) { return x; }
double method(int x) { return x; } // Ошибка! Сигнатура совпадает
}
Ставь 👍 и забирай 📚 Базу знанийclone() (реализация Cloneable)
class Person implements Cloneable {
String name;
public Person(String name) {
this.name = name;
}
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone(); // Поверхностное копирование
}
}
public class Main {
public static void main(String[] args) throws CloneNotSupportedException {
Person original = new Person("Иван");
Person copy = (Person) original.clone();
System.out.println(copy.name); // Иван
}
}
🟠Проблема с вложенными объектами (общие ссылки)
Если объект содержит вложенные объекты, они не копируются, а передаются по ссылке.
class Address {
String city;
public Address(String city) { this.city = city; }
}
class User implements Cloneable {
String name;
Address address;
public User(String name, Address address) {
this.name = name;
this.address = address;
}
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone(); // Поверхностное копирование
}
}
public class Main {
public static void main(String[] args) throws CloneNotSupportedException {
Address address = new Address("Москва");
User original = new User("Иван", address);
User copy = (User) original.clone();
copy.address.city = "Санкт-Петербург"; // Меняем адрес у копии
System.out.println(original.address.city); // Санкт-Петербург (изменилось и у оригинала!)
}
}
🟠Как сделать глубокую копию? (Deep Copy)
Решение: Создать новый вложенный объект в clone()
@Override
protected Object clone() throws CloneNotSupportedException {
User clonedUser = (User) super.clone();
clonedUser.address = new Address(this.address.city); // Копируем вложенный объект
return clonedUser;
}
Ставь 👍 и забирай 📚 Базу знаний
Available now! Telegram Research 2025 — the year's key insights 
