Q: how to set next of last element of linked list to first element in LinkedList data structure? I am trying to use java.util.LinkedList to get a linked list and change it somehow to a circular linked list.
Like is it possible to set next of the last element to first (as it can be done in a self-made linked list)? 
If not then please suggest me another way to accomplish my goal.

A: No, you can't generate a circular LinkedList. A circular LinkedList would not be able to implement its own API. How would LinkedList.add work, for example, if the list had no end?
You identified the solution: implement your own linked list.

A: You can't use LinkedList, but you can implement your own solution.
For example you can just create class containing list and declare you own API for use it. E.g.
public static class CircularList<T> implements Iterable<T> {

    private LinkedList<T> list = new LinkedList<>();

    public void add(T num) {
        list.add(num);
    }

    @Override
    public Iterator<T> iterator() {
        return new Iterator<T>() {
            int idx = 0;

            @Override
            public boolean hasNext() {
                return true;
            }

            @Override
            public T next() {
                if (list.isEmpty()) {
                    throw new RuntimeException();
                }

                if (idx + 1 < list.size()) {
                    return list.get(++idx);
                }

                idx = 0;
                return list.get(0);
            }
        };
    }
}

This is a simple implementation of a circular list.
