title: What I am getting when i am trying to print Public and private key generated for RSA in code below?
body: <p>What I am getting when i am trying to print Public and private key generated for RSA in code below?</p>
  
  <pre><code>public void generateKeyPair()throws Exception{
      KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
      keyGen.initialize(1024);
      KeyPair key = keyGen.generateKeyPair(); 
      System.out.println("Private Key --&gt; "+key.getPrivate());
      System.out.println("Public Key --&gt; "+ key.getPublic());
  
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Private Key --&gt; sun.security.rsa.RSAPrivateCrtKeyImpl@3201e
  Public Key --&gt; Sun RSA public key, 1024 bits
  modulus:     91070638360884489717846387624081331865380920530817450364127225655147956614794217905486935019170980669357616099533814798328666299188081771295145969332740783420682208946757921176081598083665454855067910689297215183406707874995244612816580868221470575486438389243678546960355939828269782848832295142018678264741
  public exponent: 65537
  </code></pre>