"नमस्कार, अमीगो! आप थोड़े नरम हो गए हैं! ये रहे आपके व्यायाम। यदि आप कठिनाइयों में हैं, तो अपने सहयोगियों से पूछें। वे निश्चित रूप से मदद करेंगे।"
"आपने सब कुछ पहले ही कर लिया है? यहाँ कुछ अभ्यास हैं जो और भी कठिन हैं:"
6
टास्क
Java Core, स्तर 10, सबक 10
Minimum changes
With minimum code changes, make it possible to serialize the C class.
12
टास्क
Java Core, स्तर 10, सबक 10
Deserialization
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.
20
टास्क
Java Core, स्तर 10, सबक 10
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.
6
टास्क
Java Core, स्तर 10, सबक 10
Correct the mistake. Serialization
After deserializing a Solution object, map m was discovered to have no data :(
Fix 1 bug.
6
टास्क
Java Core, स्तर 10, सबक 10
Serializing people
Serialize the Person class in the standard way. Add the transient modifier to some fields, if necessary.
6
टास्क
Java Core, स्तर 10, सबक 10
Serialization is prohibited
Block serialization of the SubSolution class using the NotSerializableException.
Don't change the method signatures.
20
टास्क
Java Core, स्तर 10, सबक 10
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
12
टास्क
Java Core, स्तर 10, सबक 10
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
12
टास्क
Java Core, स्तर 10, सबक 10
Introducing graphs
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.
20
टास्क
Java Core, स्तर 10, सबक 10
Number algorithms
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
12
टास्क
Java Core, स्तर 10, सबक 10
Rectangle algorithms
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]
20
टास्क
Java Core, स्तर 10, सबक 10
Word search
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