Annotations in Java


Annotations, a form of metadata, provide data about a program that is not part of the program itself. Annotations have no direct effect on the operation of the code they annotate. Thus, an annotation leaves the semantics of a program unchanged. However, this information can be used by various tools during both development and deployment. Continue reading

Posted in Tutorials | Tagged , , , , , , , | Leave a comment

My Favorite Quotes

  1. I am only one, but I am one. I can’t do everything, but I can do something. And what I can do, I ought to do. And what I ought to do by grace of god, I shall do.
  2. I can’t do nothing. I can do many a great things every day.
  3. Work makes the eyes bright and complexion rosy.
  4. Books are the most faithful friends. Our friends may change or die, but our books are always waiting to talk to us. They are never cross, peevish or unwilling to converse as our friend sometimes are.
  5. When you allow your mind to have a break, it comes back stronger, sharper more focused and creative.
  6. Self-confidence is the key to all kinds of prosperity.
  7. Hard work, positive thinking, fair dealing, right treatment of people and the proper kind of praying always get results. Continue reading
Posted in Motivational | Tagged , , , , | Leave a comment

Spiritual Reality – The Journey Within

Posted in Meditation | Tagged , , | Leave a comment

Lord Krishna reflects on how worrying about the future is unnecessary

On the basis of past experiences we imagine the joy and sorrow of the future.
To eliminate future sorrow we make plans today.
But Tomorrow’s hurdle if planned for today, does it benefit us or harm us? Continue reading

Posted in Motivational | Tagged , , , , , , , , , , , , , | 2 Comments

Enumerations in Java


Beginning with JDK 5, enumerations were added to the Java language, and they are now an integral and widely used part of Java. In their simplest form, Java enumerations appear similar to enumerations in other languages. However in Java, an enumeration defines a class type. By making enumerations into classes, the capabilities of the enumeration are greatly expanded. For example, in Java, an enumeration can have constructors, methods, and instance variables.

Continue reading

Posted in Tutorials | Tagged , , , , , , , | 3 Comments

Property Utility and Resource Bundle Utility


Continue reading

Posted in Tutorials | Tagged , , , , , , , , , , , , | Leave a comment

Java program to send mail to list of users (to list of carbon copy as well), with file attachment.

In project development we introduce communication module to communicate with customers, admin, users, and so on. The communication we use can be via mail and SMS functionality (as per the project requirement). Mail Functionality is very common and essential to send notifications, promotions, statements, invitations and so on. The program we creates to send mail should dynamic and easy maintainable so that communication should never cause issues.

Hence I have developed a program to send mail to list of users, a part of ‘To list’ or ‘CC list’ (BCC can also be added), with attachment (optional). This program can be configured with any mail server, just one has to configure it in properties file. Java Mail 1.4 dependency is used for communication helper. Continue reading

Posted in Utility & Helper | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment