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; | |
/* | |
Очень странные дела | |
*/ |
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.task2004; | |
import java.io.*; | |
import java.util.Properties; | |
/* | |
Читаем и пишем в файл статики | |
Реализуй логику записи в файл и чтения из файла для класса ClassWithStatic. | |
Метод load должен инициализировать объект включая статические поля данными из файла. | |
Метод main не участвует в тестировании. |
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.task2003; | |
import java.io.*; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Properties; | |
/* | |
Знакомство с properties | |
В методе fillInPropertiesMap считайте имя файла с консоли и заполни карту properties данными из файла. |
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.task2002; | |
import java.io.*; | |
import java.text.SimpleDateFormat; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Locale; | |
/* | |
Читаем и пишем в файл: JavaRush |
NewerOlder