//Then Pilate went out again, and said to them, "Behold, I bring him out to you, that you may know that I find no basis for a charge against him." (John 19:4) package com.javarush.task.task20.task2012; import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; /* OutputToConsole */ public class Solution { public static String greeting = "Hello world"; /** * OutputToConsole is the inner base class for improving your attentiveness. * An OutputToConsole object encapsulates the information needed * for the displaying [greeting] variable to the console. * @author JavaRush */ public static class OutputToConsole implements Externalizable { private int counter; /** * @param out A stream for an externalization * @throws java.io.IOException */ @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeInt(counter); } /** * @param in A stream for a de-externalization * @throws java.io.IOException * @throws ClassNotFoundException */ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { counter = in.readInt(); } /** * Class constructor specifying fake private field [i]. */ public OutputToConsole(int counter) { this.counter = counter; } /** * Prints greeting message to console counter times. */ public void printMessage() { for (int i = 0; i < counter; i++) { System.out.println(greeting); } } } public static void main(String[] args) { } } /* OutputToConsole ÐлаÑÑ OutputToConsole должен ÑеÑиализовÑваÑÑÑÑ Ñ Ð¿Ð¾Ð¼Ð¾ÑÑÑ Ð¸Ð½ÑеÑÑейÑа Externalizable. Ðайди и иÑпÑÐ°Ð²Ñ Ð¾ÑибкÑ. ТÑебованиÑ: 1.âÐлаÑÑ Solution.OutputToConsole должен поддеÑживаÑÑ Ð¸Ð½ÑеÑÑÐµÐ¹Ñ Externalizable. 2.âÐлаÑÑ OutputToConsole должен бÑÑÑ Ñоздан в клаÑÑе Solution. 3.âÐлаÑÑ OutputToConsole должен бÑÑÑ Ð¿ÑблиÑнÑм. 4.âÐлаÑÑ OutputToConsole должен бÑÑÑ ÑÑаÑиÑеÑким. package com.javarush.task.task20.task2012; import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; * OutputToConsole * public class Solution { public static String greeting = "Hello world"; /** * OutputToConsole is the inner base class for improving your attentiveness. * An OutputToConsole object encapsulates the information needed * for the displaying [greeting] variable to the console. * @author JavaRush */ public static class OutputToConsole implements Serializable { private int counter; /** * @param out A stream for an externalization * @throws java.io.IOException */ @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeInt(counter); } /** * @param in A stream for a de-externalization * @throws java.io.IOException * @throws ClassNotFoundException */ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { counter = in.readInt(); } /** * Class constructor specifying fake private field [i]. */ public OutputToConsole(int counter) { this.counter = counter; } /** * Prints greeting message to console counter times. */ public void printMessage() { for (int i = 0; i < counter; i++) { System.out.println(greeting); } } } public static void main(String[] args) { } } */