not sure I understand what you mean here
Desktop applications are built to run on client machines and 9 out of 10 of the times are built to run independently from any client-server architecture.
Web applications are built on client-server architecture.
Which is best...it all depends on what you want to achieve....in other words, business requirements etc.
If you meant which is easier to learn...well...you should start learning from the ground up...and that means you should learn Java first...then move on to building web applications, mobilephone apps etc.