I was wondering, how can one represent \"if\" statement on a sequence diagram?
if
if (somethingShouldBeDone) { // Do it } else { // D
If else condition, also called alternatives in UML terms can indeed be represented in sequence diagrams. Here is a link where you can find some nice resources on the subject http://www.ibm.com/developerworks/rational/library/3101.html