Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: what is the purpose of defaultWriteObject in java ObjectOutputStream

  1. #1
    Junior Member
    Join Date
    May 2021
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default what is the purpose of defaultWriteObject in java ObjectOutputStream

    Greetings,
    Hope everyone is doing great, I have a question, what is the purpose of the java DefaultWriteObject, I totally can't understand, can anybody help.
    Here is the code given about defaultWriteObject method
    private void writeObject(ObjectOutputStream out)throws IOException, ClassNotFoundException {
    out.defaultWriteObject();
    }

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: what is the purpose of defaultWriteObject in java ObjectOutputStream

    Did you read the API doc for that method? Did you have questions about what it said?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    May 2021
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: what is the purpose of defaultWriteObject in java ObjectOutputStream

    yes i read it, but can't understand it's purpose

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: what is the purpose of defaultWriteObject in java ObjectOutputStream

    I've never used it. Did you try Google?
    https://stackoverflow.com/questions/...hen-writing-in
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    May 2021
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: what is the purpose of defaultWriteObject in java ObjectOutputStream

    I gone through it but can't get what i actually want

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: what is the purpose of defaultWriteObject in java ObjectOutputStream

    Do you have code that you are having problems with?
    Post the code and a description of the problems.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. What Is The Purpose Of This Piece Of Code
    By amb101293 in forum What's Wrong With My Code?
    Replies: 22
    Last Post: October 5th, 2014, 01:53 PM
  2. What is the purpose for declaring things private.
    By cooljava50544 in forum Object Oriented Programming
    Replies: 6
    Last Post: August 7th, 2014, 10:08 PM
  3. Purpose Of java applets
    By moaz amin in forum Java Applets
    Replies: 2
    Last Post: July 5th, 2014, 04:28 AM
  4. What exactly is the purpose of a Scanner class?
    By ekrocks in forum Java Theory & Questions
    Replies: 4
    Last Post: April 7th, 2014, 10:33 PM
  5. ObjectOutputStream more than one on same socket
    By devett in forum Java Networking
    Replies: 2
    Last Post: June 10th, 2011, 10:15 AM