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.task15.task1504; | |
import java.util.LinkedList; | |
import java.util.List; | |
/* | |
ООП - книги | |
1. Создайте public static класс MarkTwainBook, который наследуется от Book. Имя автора [Mark Twain]. | |
Параметр конструктора - название книги (title). | |
2. В классе MarkTwainBook реализуйте все абстрактные методы. |
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.task19.task1903; | |
/* | |
Адаптация нескольких интерфейсов | |
Адаптируй IncomeData к Customer и Contact. | |
Классом-адаптером является IncomeDataAdapter. | |
Инициализируйте countries перед началом выполнения программы. Соответствие кода страны и названия: | |
UA Ukraine | |
RU Russia | |
CA Canada |
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.task19.task1911; | |
/* | |
Ридер обертка | |
В методе main подмени объект System.out написанной тобой ридер-оберткой по аналогии с лекцией. | |
Твоя ридер-обертка должна преобразовывать весь текст в заглавные буквы. | |
Вызови готовый метод printSomething(), воспользуйся testString. | |
Верни переменной System.out первоначальный поток. | |
Выведи модифицированную строку в консоль. | |
*/ |
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.task20.task2015; | |
import java.io.IOException; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
import java.io.Serializable; | |
/* | |
Переопределение сериализации | |
*/ |
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.task20.task2014; | |
import java.io.*; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
/* | |
Serializable Solution | |
Сериализуй класс Solution. | |
Подумай, какие поля не нужно сериализовать, пометь ненужные поля модификатором transient. |
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.task20.task2013; | |
import java.io.Externalizable; | |
import java.io.IOException; | |
import java.io.ObjectInput; | |
import java.io.ObjectOutput; | |
import java.util.List; | |
/* | |
Externalizable Person |
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.task20.task2012; | |
import java.io.Externalizable; | |
import java.io.IOException; | |
import java.io.ObjectInput; | |
import java.io.ObjectOutput; | |
/* | |
OutputToConsole | |
*/ |
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.task20.task2008; | |
import java.io.*; | |
/* | |
Как сериализовать Singleton? | |
*/ | |
public class Solution implements Serializable { | |
public static void main(String[] args) throws IOException, ClassNotFoundException { | |
Singleton instance = Singleton.getInstance(); |
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.task20.task2006; | |
import java.io.Serializable; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
/* | |
Как сериализовать? | |
*/ |
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.task20.task2005; | |
import java.io.*; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
/* | |
Очень странные дела | |
*/ |
NewerOlder