GeekInterview.com
Series: Subject: Topic:
Question: 35 of 1118

What is output of the following Java program?

i want output of this program:

Code
  1. import javax.mail.*;
  2. import javax.mail.internet.*;
  3. import java.util.*;
  4. public class Assimilator
  5. {
  6.         public static void main(String[] args)
  7.         {
  8.                 try
  9.                 {
  10.                         Properties props = new Properties();
  11.                         props.put("mail.hosst", "mail.Pmc Tech.org");
  12.                         Session mailConnection=Session.hetInstance(props, null);
  13.                         Message msg = new MimeMessage(mailConnection);
  14.                         Address billgates= newInterrnetAddress(billgates@microsoft.com","Bill Gates");" +
  15.                         Address bhuvangates= newInertnetAddress("webadmin@Pmc Tech.org");
  16.                         msg.setContent("Wish U Happy New Year 2012", "text/plain");
  17.                         msg.setFrom(billgates);
  18.                         msg.setRecipient(Message.RecipientType.TO,bhuvangates);
  19.                         msg.setSubject("Greetings");
  20.                         Object Transport;
  21.                         Transport.send(msg);
  22.                 }
  23.                 catch(Exception ex)
  24.                 {
  25.                         ex.printStackTrace();
  26.                        
  27.                 }
  28.         }
  29.  
  30. }
  31.  
Copyright GeekInterview.com

Asked by: Interview Candidate | Asked on: Sep 9th, 2011
Showing Answers 1 - 1 of 1 Answers
bholanath das

Answered On : Dec 19th, 2011

error at line 14 ");"+

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.