January 17th, 2006, 10:22 AM
Your issue is with these two lines.
When you call a method, you only send the name of the variable, not the type.
Comments on this post
January 17th, 2006, 02:02 PM
Ah, thank you very much. I didn't know that.
Originally Posted by bullet
December 10th, 2013, 05:48 AM
compiling shows '.class' expected
and i wrote my program this way...a simple one
and the error is in following highlighted line
public void calc(String s, String wd)
December 10th, 2013, 05:52 AM
When you have an if statement, normally if there is one line in the body, you don't need to use braces around the body. But in the case of a variable declaration, this is not considered a single statement. You need to surround the body with braces.