Quick Scala Tutorial – Learn with Examples

This tutorial will help you learn Scala quickly. Adopts a practical approach to learning. Task 1 : Install Scala and Configure It Download Scala by visiting  http://www.scala-lang.org/downloads Download the latest version. The version I used is 2.11.8.  That version is available here http://www.scala-lang.org/download/2.11.8.html The installable is… Read More

Transform XML with XSLT using Java

XML and XSLT makes data exchange and rendering of the data in various formats easier. XML is pretty good for portable data exchanges, well structured data formats and helps in open standards. XSLT on the other hand can transform the XML to other formats. For… Read More

Sending Email using javax.mail API

The JavaMail standard extension in package javax.mail and javax.mail.internet (the latter contains classes that are specific to Internet email protocols) provides classes to send emails. Let us consider the example of how to send mail using the SMTP protocol. Example : Send Mail using SMTP… Read More

Compute logarithms using Java

This post is about calculating logarithms using Java. Java provides supports for logarithms via the java.lang.Math package, the log() function.This function is to the base e.Base e or the natural logarithm represent the log to a constant (e) whose value is approximately 2.718281828. To compute… Read More

How to read characters of a string

To process a string, character by character we can use the charAt() method of the String class. Use this method in a for loop.

The same approach can be used to print a string in reverse.


How To Create Custom Annotations In Java

This tutorial is about creating custom annotations in Java. Ever since Java started supporting annotations, most of the frameworks embraced annotations and now annotations are the best way to define the extra services that a class requires. Much cleaner and easier than XML or properties… Read More