Skip to content

Commit 502ac8d

Browse files
remove interview files, add new sections
1 parent 1592881 commit 502ac8d

25 files changed

Lines changed: 446 additions & 403 deletions

‎README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
+ [Servlet](#Servlet)
88
+ [Hibernate](#Hibernate)
99
+ [Microservices](#Microservices)
10+
+ [JavaScript](#JavaScript)
1011

1112
## Core
1213

@@ -54,3 +55,5 @@
5455
## Servlet
5556

5657
## Hibernate
58+
59+
## JavaScript

‎algorithm.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
## есть большущий список, нужно сделать поиск по какому-то полю (бд выполняют эту задачу)

‎collections.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ It depends on many things. It's usually O(1), with a decent hash which itself is
1313
###### Relative links:
1414
+ https://stackoverflow.com/questions/4553624/hashmap-get-put-complexity
1515

16+
## Алгоритмическая сложность при get для HashMap для ключей, у которыъ hashcode = 1 ?
17+
###### Relative links:
18+
1619
## Какие есть коллекции? интерфейсы? реализации?
1720
###### Relative links:
1821

@@ -39,3 +42,6 @@ It depends on many things. It's usually O(1), with a decent hash which itself is
3942

4043
## Различия между set и map?
4144
###### Relative links:
45+
46+
## мапы в многопоточной среде? какие есть мапы, нюансы?
47+

‎concurrency.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,6 @@ HashMap is the best thing to use in a single threaded application.
8181

8282
## Способы синхронизации потоков?
8383
###### Relative links:
84+
85+
## todo код deadlock?
86+
###### Relative links:

‎core.md‎

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,92 @@ Streams differ from collections in several ways:
1414
+ Consumable. The elements of a stream are only visited once during the life of a stream. Like an Iterator, a new stream must be generated to revisit the same elements of the source.
1515
###### Relative links:
1616
+ https://stackoverflow.com/questions/39432699/what-is-the-difference-between-streams-and-collections-in-java-8
17+
18+
## Реализовать stream api (с функциями filter, map), lambda можно использовать
19+
###### Relative links:
20+
21+
## Где хранится ссылка на объект?
22+
stack
23+
###### Relative links:
24+
+ https://stackoverflow.com/questions/13624462/where-does-class-object-reference-variable-get-stored-in-java-in-heap-or-stac
25+
26+
## Типы памяти в Java?
27+
+ Cтек – участок памяти, тесно связанный с потоками. У каждого потока есть свой стек, которые хранит локальные переменные, параметры методов и стек вызовов. Переменная, хранящаяся в стеке одного потока, не видна для другого.
28+
+ Куча – общий участок памяти, который делится между всеми потоками. Объекты, неважно локальные или любого другого уровня, создаются в куче. Для улучшения производительности, поток обычно кэширует значения из кучи в свой стек, в этом случае для того, чтобы указать потоку, что переменную следует читать из кучи используется ключевое слово volatile.
29+
###### Relative links:
30+
+ https://github.com/enhorse/java-interview/blob/master/concurrency.md#%D0%A0%D0%B0%D1%81%D1%81%D0%BA%D0%B0%D0%B6%D0%B8%D1%82%D0%B5-%D0%BE-%D0%BC%D0%BE%D0%B4%D0%B5%D0%BB%D0%B8-%D0%BF%D0%B0%D0%BC%D1%8F%D1%82%D0%B8-java
31+
32+
## Что такое java agent?
33+
Сам агент это отдельное приложение которое предоставляет доступ к механизму манипуляции байт-кодом (java.lang.instrument) в runtime.
34+
###### Relative links:
35+
+ https://habr.com/ru/post/230239/
36+
+ https://www.javacodegeeks.com/2015/09/java-agents.html
37+
38+
## был опыт troubleshooting?
39+
logs, new relic
40+
###### Relative links:
41+
42+
## Пользовались profiler?
43+
A Java Profiler is a tool that monitors Java bytecode constructs and operations at the JVM level. These code constructs and operations include object creation, iterative executions (including recursive calls), method executions, thread executions, and garbage collections.
44+
###### Relative links:
45+
+ https://www.baeldung.com/java-profilers
46+
47+
## Что такое stop the world?
48+
garbage collector
49+
50+
## Чем отличается int, Integer, AtomicInteger?
51+
+ int is a primitive type. Variables of type int store the actual binary value for the integer you want to represent. int.parseInt("1") doesn't make sense because int is not a class and therefore doesn't have any methods.
52+
+ Integer is a class, no different from any other in the Java language. Variables of type Integer store references to Integer objects, just as with any other reference (object) type. Integer.parseInt("1") is a call to the static method parseInt from class Integer (note that this method actually returns an int and not an Integer). To be more specific, Integer is a class with a single field of type int. This class is used where you need an int to be treated like any other object, such as in generic types or situations where you need nullability.
53+
+ AtomicInteger is used in multithreaded environments when you need to make sure that only one thread can update an int variable. The advantage is that no external synchronization is requried since the operations which modify it's value are executed in a thread-safe way.
54+
###### Relative links:
55+
+ https://stackoverflow.com/questions/8660691/what-is-the-difference-between-integer-and-int-in-java
56+
+ https://stackoverflow.com/questions/38846976/what-is-the-difference-between-atomic-integer-and-normal-immutable-integer-class
57+
58+
## i++ для Integer, что будет с памятью?
59+
variable will be changed
60+
###### Relative links:
61+
+ https://stackoverflow.com/questions/13280134/why-does-post-increment-work-on-wrapper-classes
62+
63+
## Как ты относишься к использованию констант в интерфейсах?
64+
The constant interface pattern is a poor use of interfaces. That a class uses some constants internally is an implementation detail. Implementing a constant interface causes this implementation detail to leak into the class's exported API. It is of no consequence to the users of a class that the class implements a constant interface. In fact, it may even confuse them. Worse, it represents a commitment: if in a future release the class is modified so that it no longer needs to use the constants, it still must implement the interface to ensure binary compatibility. If a nonfinal class implements a constant interface, all of its subclasses will have their namespaces polluted by the constants in the interface. There are several constant interfaces in the java platform libraries, such as java.io.ObjectStreamConstants. These interfaces should be regarded as anomalies and should not be emulated.
65+
###### Relative links:
66+
+ https://stackoverflow.com/questions/2659593/what-is-the-use-of-interface-constants
67+
68+
## Контракт equals/hashcode?
69+
###### Relative links:
70+
71+
## Правила переопределения equals/hashcode?
72+
73+
## Для equals/hashcode нужны одни и те же поля?
74+
75+
## Если объекты равны, hash должен быть равен?
76+
###### Relative links:
77+
78+
## Для чего используются вложенные классы?
79+
###### Relative links:
80+
81+
## Что лучше использовать interfaces или abstract classes?
82+
###### Relative links:
83+
84+
## Есть ли доступ к приватной переменной внешенго класса из внутреннего?
85+
###### Relative links:
86+
87+
## Различия между статическим внутренним и нестатическим внутренним классами?
88+
###### Relative links:
89+
90+
## Что не рекомендуется делать в параллельных стримах?
91+
###### Relative links:
92+
93+
## client по ссылке? кусок кода?
94+
###### Relative links:
95+
96+
## методы у класса object?
97+
98+
## что такое jmeter?
99+
100+
## снять дамп памяти для приложения? как это сделать?
101+
102+
## как лучше всего замерить время выполнения метода? что думаешь о проверке с помощью end date - start date?
103+
104+
105+

‎docker.md‎

Whitespace-only changes.

‎git.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Git
2+
3+
## Различия между merge и rebase?
4+
###### Relative links:
5+
6+
## Что такое reset?
7+
###### Relative links:
8+
9+
## Различия между soft reset и hard reset?
10+
###### Relative links:

‎interview‎

Lines changed: 0 additions & 69 deletions
This file was deleted.

‎interview_0‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎interview_2‎

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)