uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

W049 Duplicated Method Name

Umple semantic warning reported when two methods have the same names and return types

You cannot have two methods that have the same names and return types. The warning is shown to notify the developer of the potential mistake.

Example

// This example generates the message
class A{
  void test1(){return("hello world")}
  void test1(){return("dlrow olleh")}
}



      

Load the above code into UmpleOnline

 

Another Example

// The following shows how to avoid the message.
class A{
  void test1(){}
  void test2(){}
}


      

Load the above code into UmpleOnline