UML is a modeling language that most developers employed during design phase. UML provides various types of diagrams used for specifying both the structure and the behavior of systems. During the development process, models specified by these diagrams are eventually transformed into corresponding code. Although there are many researches studied about transforming UML models into code, they discussed mainly about class, state and collaboration diagrams. None proposed about rules for transforming UML sequence diagrams into a corresponding code. This paper proposes a transformation approach for transforming UML sequence and class diagrams into Java code. The transformation approach consists of a meta model for sequence diagram and transformation rules. The proposed approach is evaluated by applying to at least 3 applications.