- Лекция 10. Многопоточность (Программирование на Java)
- Лекция 11. Многопоточность (продолжение)
- Лекция 12. Java: аннотации, рефлекшн, байткод
- Сбер: Курс по многопоточке
- Управление потоками. Ключевое слово volatile и метод yield()
- Техническое Java-интервью в Тинькофф
- Часть 4. Основы Maven
- Maven, где мои артефакты? Еще одна статья про управление зависимостями
- yandex: happens before
- [Глубокое погружение в Java Memory Mo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.*; | |
public class Main { | |
public static void main(String[] args) { | |
InputReader in = new InputReader(System.in); | |
PrintWriter out = new PrintWriter(System.out); | |
new Task().solve(in, out); | |
out.close(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ListExtenstions | |
{ | |
public static void AddRange<T>(this IList<T> source, IList<T> second) | |
{ | |
foreach (var it in second) | |
{ | |
source.Add(it); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void AddRangeTest() | |
{ | |
IList<int> lst1 = new List<int>{1, 2, 3, 4, 5}; | |
IList<int> lst2 = new List<int> {9, 8, 7, 6}; | |
lst1.AddRange(lst2); | |
Assert.That(lst1.Count, Is.EqualTo(9)); | |
} |