title: How to add multiple student data dynamically using ArrayList ?
body: <p>I want to add multiple student data dynamically by using ArrayList but it shows wrong print
   e.g</p>
  
  <p>STD.Student@1a2760f
   STD.Student@f4d6b3    </p>
  
  <pre><code>public class Student {
              String strName;
              int iRollNum;
  
  
      public static void main(String[] args) {        
  
  
  
      ArrayList&lt;Student&gt; myArrayList=new ArrayList&lt;Student&gt;();
          Student student=new Student("Asha",4);
          myArrayList.add(student);
          Student student2=new Student("Asha",4);
          Student student3=new Student("Asha",4);
          Student student4=new Student("Asha",4);
          Student student5=new Student("Asha",4);
          myArrayList.add(student2);
          myArrayList.add(student3);
          myArrayList.add(student4);
          myArrayList.add(student5);
  
          for (int i = 0; i &lt;myArrayList.size(); i++) {   
  
  
      System.out.println(myArrayList.get(i));
              }
  
  
              }
  
                  public Student(String strName, int iRollNum) {
                  this.strName = strName;
                  this.iRollNum = iRollNum;
              }
  </code></pre>
  
  <p>plz help how to slove this problem </p>