public class Testww {

public String toString(){
  return "CrashJava address :"+this+"\n";
}

   public static void main(String []args){
  
  Vector v=new Vector();
  for(int i=0;i<10;i++){
  v.addElement(new Testww());
  System.out.print(v);
  }   }

“+"会将后面的东西(this)转换成一个字符串,调用toString()方法,将会出现递归调用,导致栈溢出