This file contains 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
package com.javarush.task.task27.task2709; | |
public class ConsumerTask implements Runnable { | |
private TransferObject transferObject; | |
protected volatile boolean stopped; | |
public ConsumerTask(TransferObject transferObject) { | |
this.transferObject = transferObject; | |
new Thread(this, "ConsumerTask").start(); | |
} |
This file contains 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
package com.javarush.task.task30.task3008; | |
import java.io.Closeable; | |
import java.io.IOException; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
import java.net.Socket; | |
import java.net.SocketAddress; | |
public class Connection implements Closeable { |
This file contains 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
package com.javarush.task.task26.task2609; | |
/* | |
Распределение элементов по корзинам с собственным локом | |
*/ | |
public class Solution { | |
private static final int NUMBER_LOCKS = 12; | |
private final Node[] buckets; | |
private final Object[] locks; |
This file contains 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
package com.javarush.task.task26.task2603; | |
import java.util.Arrays; | |
import java.util.Comparator; | |
/* | |
Убежденному убеждать других не трудно | |
*/ | |
public class Solution { |
This file contains 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
package com.javarush.task.task26.task2601; | |
import java.lang.reflect.Array; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
/* | |
Почитать в инете про медиану выборки | |
*/ |
This file contains 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
package com.javarush.task.task25.task2512; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
/* | |
Живем своим умом | |
*/ | |
public class Solution implements Thread.UncaughtExceptionHandler { |
This file contains 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
package com.javarush.task.task36.task3608; | |
import com.javarush.task.task36.task3608.controller.Controller; | |
import com.javarush.task.task36.task3608.model.MainModel; | |
import com.javarush.task.task36.task3608.model.Model; | |
import com.javarush.task.task36.task3608.view.EditUserView; | |
import com.javarush.task.task36.task3608.view.UsersView; | |
public class Solution { | |
public static void main(String[] args) { |
This file contains 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
package com.javarush.task.task24.task2409; | |
public interface Item { | |
int getId(); | |
double getPrice(); | |
String getTM(); | |
} |
This file contains 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
package com.javarush.task.task24.task2408; | |
import java.util.Date; | |
/* | |
В работе вам иногда будет нужно закастить класс к какому-нибудь другому классу, не интерфейсу :))) | |
Класс DogPet использует 2 класса - SuperDog и Dog, разберись с getName в классе DogPet | |
Так намного лучше, чем Copy+Paste! | |
*/ | |
public class Dog implements Pet { |
This file contains 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
package com.javarush.task.task24.task2413; | |
import java.awt.event.KeyEvent; | |
import java.util.ArrayList; | |
/** | |
* Главный класс игры | |
*/ | |
public class Arkanoid { | |
// ширина и высота |