WARNING - This method has a constructor name


This Method has a constructor name.

Sample Code 

class BuggyBread1 {
public void BuggyBread1(){

public String method(){
System.out.println("String Method 1");
return "Yes";


Constructor cannot have any return type, not even Void. Though in this case its not an error and Compiler treats this as a new method but still it warns you as you might have done that by mistake.