Q:

Builder Pattern with only one class

I'm learning the Builder Pattern. I have a question, Why don't using a class (ex: MyCoffe)instead of 2 class (ex: MyCoffe, BuilderClass). Thanks you for reading.
package Creational.Builder;

public class MyCoffe {

        private String name;
        private int id;

        public MyCoffe(){

        }

        public MyCoffe setName(String newName){
            this.name  = newName;
            return this;
        }

        public MyCoffe setId(int newId){
            this.id = newId;
            return this;
        }

        public MyCoffe build(){
            return this;
        }

        public String toString(){
            return name + "/" + id;
        }

        public static void main(String[] args){
            MyCoffe myCoffe = new MyCoffe().setName("HelloWorld").setId(9999);  
            System.out.println(myCoffe);

            System.out.println("Thanks for help!");
        }
}

A:

You certainly can in some select situations, but one of the purposes of the builder pattern is to avoid having an invalid instance of a class. So unless it's valid for MyCoffe to not have a name or ID, you don't want an instance of it running around without a name or ID, like this:
MyCoffe invalid = new MyCoffe();

Also note that when the class is self-building like that, it's easy to forget to call the final build method (as, in fact, you did in your main), so the instance never gets validated.
Hence using a separate builder to hold the incomplete information before building the complete, valid instance.
In Java, it's not uncommon for the builder to be a static nested class:
public class MyCoffe {

    public static class Builder {
        private String name;
        private int id;

        public Builder() {
        }

        public Builder setName(String name) {
            this.name = name;
            return this;
        }

        public Builder setId(int id) {
            this.id = id;
            return this;
        }

        public MyCoffe build() {
            if (this.name == null) {
                throw new AppropriateException("'name' is required");
            }
            if (this.id == 0) { // Assumes 0 isn't a valid ID
                throw new AppropriateException("'id' is required");
            }
            return new MyCoffe(name, id);
        }
    }

    private String name;
    private int id;

    public MyCoffe(String name, int id) {
        this.name = name;
        this.id = id;
    }

    @Override
    public String toString(){
        return name + "/" + id;
    }

    public static void main(String[] args){
        MyCoffe myCoffe = new MyCoffe.Builder().setName("HelloWorld").setId(9999).build();
        System.out.println(myCoffe);

        System.out.println("Thanks for help!");
    }
}

Or if declaring the properties twice like that bothers you, MyCoffe can allow private incomplete instances, like this:
public class MyCoffe {

    public static class Builder {
        private MyCoffe instance;

        public Builder() {
            this.instance = new MyCoffe();
        }

        public Builder setName(String name) {
            this.instance.name = name;
            return this;
        }

        public Builder setId(int id) {
            this.instance.id = id;
            return this;
        }

        public MyCoffe build() {
            if (this.instance.name == null) {
                throw new AppropriateException("'name' is required");
            }
            if (this.instance.id == 0) { // Assumes 0 isn't a valid ID
                throw new AppropriateException("'id' is required");
            }
            return this.instance;
        }
    }

    private String name;
    private int id;

    private MyCoffe() {
    }

    public MyCoffe(String name, int id) {
        this.name = name;
        this.id = id;
    }

    @Override
    public String toString(){
        return name + "/" + id;
    }

    public static void main(String[] args){
        MyCoffe myCoffe = new MyCoffe.Builder().setName("HelloWorld").setId(9999).build();
        System.out.println(myCoffe);

        System.out.println("Thanks for help!");
    }
}

