class SomeClass { public function SomeClass ( ) { } } The following code adds a constructor method to MyClass. package com.java2s { public class MyClass { public function MyClass ( ) { } } }