Q:

Switch Statement Survey

I am having a few problems with this build. First it is not all it will not load the main class. Second I need the user to input their choice of music and then I need the compiler to print selection. Can someone help me with this code? Please excuse me but I am totally new to programming.
public class music {

public static void music(String[] args) {

    System.out.println("What's your favorite kind music?: ");
    System.out.println("1. Country");
    System.out.println("2. Rock");
    System.out.println("3. Heavy Metal");
    System.out.println("4. Folk");

    try{
    BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
    int s = Integer.parseInt(bufferRead.readLine());
        switch(s){
            case 1:
                System.out.println("Country");
                break;
            case 2:
                System.out.println("Rock");
                break;
            case 3:
                System.out.println("Heavy Metal");
                break;
            case 4:
                System.out.println("Folk");
                break;
            default:
                System.out.println("Country");
                break;
      }

}catch(IOException e){
        e.printStackTrace();
    }

A:

public static void music(String[] args)

This does not look like main method. You should use main in place of music: -
public static void main(String[] args)

Also, the compilation unit containing this class should have the same name as that of the class. And better use your class name as : - Music and save it as Music.java

A:

Your method must be named main. Review this tutorial.
Instead of:
public static void music(String[] args) {

try:
public static void main(String[] args) {

public static void music(String[] args) defines a static method with the same names as the class.

A:

your code is looks ok but only You can not rename main method, main() method signature must be public static void main(String[] args) and your code should be like
public class Music{
    public static void main(String[] args) {
     ...
    }
}

Note - main method signature is constant and find the significance below.
public - public everyone can access it.
static - Java environment should be able to call this method without creating an instance of the class , so this    method must be declared as static.
void - the return void so there's no return value.
main( ) - the name of the method, main because it's the main method. 
String args[] - arguments to this method. This method must be given an array of Strings, and the array will be called 'args'. 

