Java Tutorials, Tips & Tricks

Sending Emails in Java using GMail ID

Thought of sharing following code with you all. It is a small code snippet that uses SMTP in Java to login into GMail and send email using ones GMail account. String host = “smtp.gmail.com”;...

Convert ArrayList to Arrays in Java

A lot of time I have to convert ArrayList to Arrays in my Java program. Although this is a simple task, many people don’t know how to do this and end up in iterating...

Double Brace Initialization in Java!

Double Brace Initialization in Java!

Few days back I came to know about a different way of initializing collections and objects in Java. Although this method of initialization has been there in Java since quite a few years now,...