Question: //return rule break

```
class Fianalblck
{

    public static void main(String... s)
    {
        //int show

        int x;
        {
            try {
                return 10;
            }
            catch(Exception e)   {

            }
            finally {
                return 20;
            }
        } System.out.println(x);
    }
}

```

Answer: 
Your main method is `void` meaning it can't return anything. If you wish to return a value, create another method that is a returnable type (`boolean, int, double, String,` etc.) then call that method from your main.

It looks like you need to start from the beginning, [here](https://docs.oracle.com/javase/tutorial/java/nutsandbolts/) is a link to a java basics tutorial.

[Here](https://docs.oracle.com/javase/tutorial/java/javaOO/returnvalue.html) is a tutorial on `return`.
I guess this is what you want to do:

```
class Fianalblck
{
    private int func() {
        try {
            return 10;
        }
        catch(Exception e)   {

        }
        finally {
            return 20;
        }
    }
    public static void main(String... s)
    {
        Fianalblck f = new Fianalblck();
        int x;
        x = f.func();
        System.out.println(x);
    }
}

```

You want to try whether 10 or 20 will be returned from a method.

In java, you have to declare a new method, and call that method with the instance of Fianalblck.