For this Question: You are given a Singly linked list and an integer K. Your task is to insert the integer K at the head of the given linked list<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b>addElement()</b> that takes head node and the element K as a parameter.


Constraints:
1 <=N<= 1000
1 <=K, value<= 1000Return the head of the modified linked listSample Input:-
5 2
1 2 3 4 5 

Sample Output:
2 1 2 3 4 5
, I have written this Solution Code: public static Node addElement(Node head,int k) {
Node temp =new Node(k);
temp.next=head;
return temp;
    }, In this Programming Language: Java, Now tell me if this Code is compilable or not?