I\'m following the CS106A lectures online. I\'m going through the code on Lecture 12, but it\'s giving me errors in Eclipse.
This is my code. It seems the error is beca
Because You have added ; at the end of an method
corrected Code:
public class CS106A {
public static void main(String[] args){
Char char=new CS106A.toLower('s');
System.out.println(char);
}
public char toLower(char ch)
{
if (ch >= 'A' && ch <= 'Z'){
return ((ch - 'A') + 'a');
}
return ch;
}
}
Please Read how to write Methods in java on any java website