1/6
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
How do you get a list of IP addresses assigned to a network interface in Java?
Call NetworkInterface.getNetworkInterfaces() to list interfaces, then getInetAddresses() on each for its IPs.
What happens to an object's references during serialization?
When you serialise an object, its references get serialised too, but only if they're also Serialisable, otherwise you get a NotSerialisableException.
How many methods does the Externalizable interface have?
Externalizable has two methods: writeExternal() and readExternal().
What is object serialization, and how do you implement it?
Serialization turns an object's state into bytes. Implement it via Serializable, or Externalizable, which needs writeExternal() and readExternal().
What is the difference between wait() and sleep()?
wait() releases the lock and needs notify() to wake up. sleep() keeps its locks and wakes up on its own.