Consider the subsets A and B of $\mathbb{R}^2$ defined by
$A = \{\left(x,x\sin\frac1x\right):x \in(0,1]\}$ and $B=A \cup \{(0,0)\}.$
Then which of the followings are true?
1. $A$ is compact
2. $A$ is connected
3. $B$ is compact
4. $B$ is connected.
I know that A is connected but not path connected, so 2 is true. But I'm not sure about the others.