class ShareData
{
  private static int share;
  
  public void memorize( int i )
  {
    share = i;
  }
  
  public int retrieve ()
  {
    return share;
  }
  
  public static void main( String[] args )
  {
    ShareData s1 = new ShareData();
    ShareData s2 = new ShareData();
    
    s1.memorize( 2 );
    
    System.out.println( s2.retrieve() );    // ist 2
  }
}

