No offence but I think that you should try to use less patterns and first learn java. And give us some more information because we're guessing. What is Object? Is it the java.lang.Object class? Then it's no wonder that it's not compiling because that class does not contain the static function getInstance.