This is important because I am creating an object out of deserialized primitives within the readObject method. So if I am writing
ObjectInputStream s; //From the readObject method
Object obj = new Object(s.readDouble(), s.readDouble(), s.readDouble());
Will it deserialize in the correct order, the order they were written to the byte stream?
Yes, they will deserialize in the correct order.
You might want to create (good) named variables out of those
s.readDouble()values though, it’s more clear what they mean.