The conditions “J and J are holding hands” and “L and L are holding hands” are naturally symbolized as JJ and LL, respectively. The condition “K and K are not holding hands” can be symbolized as K...K. [The symbol ~(KK) would also work well, but the symbol K...K is more descriptive because it shows the space between the Ks.] The condition “One of the Ls is at one end of the line, and one of the Ms is at the other end” can be symbolized as L=1st/last and M=1st/last. The diagram will consist of eight dashed lines numbered 1 through 8, from left to right:
JJ
LL
K ... K
L = First / Last
M = First / Last

No significant conditions can be derived from the given information, and no conditions can be placed on the diagram. So we attack the questions.
To start, place M and K at positions 2 and 3, respectively:

From the conditions LL and L = 1st/last, we see that the Ls must be in positions 7 and 8, since M is in position 2:

Now the condition M = 1st / last forces the other M into position 1:

This yields two possible positions for the condition JJ:

Diagram II is impossible, though, because it forces the Ks next to each other, violating the condition K...K. Thus Diagram I, which has the Js in positions 4 and 5, is uniquely determined by the conditions. The answer is (B).