"Hello, Amigo! You've gotten a little soft! Here are your exercises. If you run into difficulties, check with your colleagues. They'll definitely help."
With minimum code changes, make it possible to serialize the C class.
Serialized A or B objects are written to the stream that is passed in. Deserialize the object in the getOriginalObject method. If an exception occurs, display a message and return null. Implement the Serializable interface where necessary.
Find the bugs
For some reason, errors are occurring when serializing/deserializing B objects. Find the problem and fix it. The A class should not implement the Serializable and Externalizable interfaces. There is no error in the B class's signature :). There are no errors in the main method.
Correct the mistake. Serialization
After deserializing a Solution object, map m was discovered to have no data :( Fix 1 bug.
Serialize the Person class in the standard way. Add the transient modifier to some fields, if necessary.
Serialization is prohibited
Block serialization of the SubSolution class using the NotSerializableException. Don't change the method signatures.
Overriding serialization in a thread
Serializing/deserializing the Solution class doesn't work. Fix the bugs without changing method or class signatures. The main method is not tested. Write the verification code yourself in the main method: 1) create an instance of the Solution class 2) write data to it (writeObject) 3) serialize the
Making the right conclusion
Arrange calls to the superclass's methods and access modifiers to achieve the following screen output: C class, method2 A class, method2 A class, method1 B class, method1 1. Only one of the superclass's methods can be called from each method. 2. Only one of the class's methods can be called from e
Read the additional materials on serialization of graphs. The Solution class has a directed planar graph containing cycles and loops. For example, http://edu.nstu.ru/courses/saod/images/graph1.gif Serialize Solution. The direction of all of the edges must remain the same.
"You did everything already? Well, here are some exercises that are even more difficult:"
Suppose the number S consists of M digits. For example, if S = 370, then M (the number of digits) = 3 Implement the getNumbers method. Among natural numbers less than N (long), it should find all the numbers satisfying the following criterion: The number S is equal to the sum of its digits raised in the Mth
1. Here we have a two-dimensional N*N array that contains several rectangles. 2. The various rectangles do not touch or overlap. 3. The interior of each rectangle is filled with 1s. 4. The array values have the following meaning: 4.1) a[i, j] = 1 if element (i, j) belongs to a rectangle 4.2) a[i, j]
1. We have a two-dimensional array that contains lowercase letters. 2. The detectAllWords method must find all the words in the wordSearch array. 3. The element(startX, startY) must correspond to the first letter of the word, while the element(endX, endY) corresponds to the last letter. text is the