Boostr



0 votes
9 views
1. serialver command
JDK has a build in command called “serialver” to generate the serialVersionUID automatically. In this example, you use “serialver” to generate a serialVersionUID for Address class.
E:\workspace\target\classes>serialver Address
Address:    static final long serialVersionUID = -687991492884005033L;
2. Use Eclispe IDE
If you are using Eclipse, move your mouse over the serialization class.

Or Click on the serialization class and press “CTRL + 1“.
3. Anything you want
Just specify your own serialVersionUID , give a number and append an “L” behind.
private static final long serialVersionUID = 1L;
asked Sep 11 in Java Interview Questions by Amrendra | 9 views



Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

Related Questions



Welcome to Knowledge Boostr, where you can ask questions and receive answers from other members of the community.
This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

http://boostr.in Q&A for professional and enthusiast programmers http://boostr.in Q&A for professional and enthusiast programmers http://boostr.in Q&A for professional and enthusiast programmers http://boostr.in Q&A for professional and enthusiast programmers


23,471 questions
40,135 answers
12 comments
23,609 users