<p>I'm writing code in Java, using the NetBeans IDE. I keep getting a couple of "Incompatible Type" errors. I declare a variable as String and then assign to it the value from a method that returns a String too. The error says that there was expected a type of "String" but instead found "..." where "..." the name of the method I call.</p>

<p>For example, this is a line that gives me the error:</p>

<pre>
incompatible types
found:     encode_monoalphabetic_engine
required:  java.lang.String

encoded = encode_monoalphabetic_engine(string);
</pre>

Perhaps you could post a more complete code snippet?
It looks like your method argument
```
string
```
isn't a
```
java.lang.String
```
?