-1

"can you please solve this problem ! ! i really don't know how to get it."

public class Student was i really stuck at" The nested type Student cannot hide an enclosing type ?

=====================================================

   package com.srk.pkg;
        
        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;
        
        /**
         * Servlet implementation class Student
         */
        public class Student extends HttpServlet {
            private static final long serialVersionUID = 1L;
               
            /**
             * @see HttpServlet#HttpServlet()
             */
            public class Student {
                    private String studentID;
                    private String name;
                    private String address;
            
                
                
                
                public String getaddress; {
                    return address;
                }
                
                public void getAddress(String Address){
                    this.address =address;
                }
                public String getname; {
                    return name;
                }
                
                public void setStudentID(String StudentID){
                    this.getStudentID =StudentID;
                }
                
                public Student(String ID, String name, String address) {
                    this.studentID= studentID;
                    this.name= studentID;
                    this.address = studentID;
                    
                }
            Public Student [][];
                }}
Community
  • 1
  • 1

1 Answers1

0

You defined the class Student twice, one inside the other. You can't do that. Either remove it, or rename one of them.

Eric Guan
  • 15,474
  • 8
  • 50
  • 61