2023 Jan CD short q's

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/6

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:33 PM on 8/6/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

7 Terms

1
New cards

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.

2
New cards

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.

3
New cards

How many methods does the Externalizable interface have?

Externalizable has two methods: writeExternal() and readExternal().

4
New cards

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().

5
New cards

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.

6
New cards
What does the volatile keyword guarantee, and what doesn't it guarantee?
volatile makes sure every thread sees the latest value, but it doesn't make things like x++ atomic.
7
New cards
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.