facebook

code change

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #232067 Reply

    somsahi
    Member

    1)got servlet code
    from bookstore and copied it to eclipse+myeclipse.original code is like this

    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;………
    after copying two warning is coming one import java.util.*; is never used so i do organise import and code is now converted to

    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    2)even after this one more warning is that serilizable class bannerservlet does not declare a stati final serialVersionUID
    so problem is i am not getting thses two concepts and what to
    thanxs in advance

    #232081 Reply

    Scott Anderson
    Participant

    Basically, they’re both correct warnings. You’ll be warned when you don’t use imports that you include, so organizing them got rid of the import and thus addressed the warning. And, if you implement java.io.Serializable, it is recommneded that you declare a serialVersionUID for forward compatibility. Please see the javadoc for Serializable for a description.

    However, both are warnings and you can continue on and safely ignore them for your purposes.

    #232107 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev, for the 4th time.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: code change

You must be logged in to post in the forum log in