Q:

Void methods cannot return a value

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 because of the word void in my main method. I tried deleting the main method, but of course Java can't run without it. 
I'm a newbie and no one has explained what the String[] args thing really means, but I've been told to just ignore it and use it. I'd appreciate if someone could explain that to me as well.
This errors also comes up on the 'toLower' method; no idea what it means:
Illegal modifier for parameter toLower; only final is permitted
(if it helps; the point of the code is to convert an uppercase letter to a lowercase one)
public class CS106A {

    public static void main(String[] args){

        public char toLower(char ch);
            if (ch >= 'A' && ch <= 'Z'){
                return ((ch - 'A') + 'a');
        }
        return ch;      
    }

}

Thanks

A:

You should be defining your method outside of main, like:
public class YourClass
{
    public static void main(String... args)
    {

    }

    public char yourMethod()
    {
         //...
    }
}

Java does not support nested methods; however, there are workarounds, but they are not what you're looking for.
As for your question about args, it is simply an array of Strings that correspond to command line arguments.  Consider the following:
public static void main(String... args) //alternative to String[] args
{
    for (String argument: args)
    {
        System.out.println(argument);
    }
}

Executing via java YourClass Hello, World!
Will print

Hello, Word!

