And in consideration, id like to go
into mobile app dev...So thats +1 for
Java.
How is that +1 for Java? We're talking about server-side languages.. you're not running your server off a phone are you? Sure, you can use Java to build apps in addition to running your website, but that's a different story.
Time taken to learn the language is
not an issue...Just would like to know
which is the most profitable at the
end of all the training.
Neither language will make your site more profitable, but you may be in higher demand with different companies depending on what you know.
And on a slight note. Can Javascript
work with Java? And what is the real
advantage of that?
Well... yes, but that's almost a nonsensical question. You use Java or PHP to produce the HTML that gets sent to the client, and then your JavaScript manipulates that. It's completely unrelated to what language you use server-side.
@comment: I can't really say which is more worth learning. I suppose Java is more versatile in that it has more applications outside the web. PHP is supported by more web-servers though (AFAIK), so you won't have trouble if you need to work on a different server.
I can't fairly recommend one over the other though. I've only used PHP for web, and Java for non-web. I like PHP because it's easy to pickup, easy to use, and all sorts of stuff is built into the language without any includes or anything. Has a big community, so there's lots of scripts you can download. One might argue that it's also a mess of a language, but as long as you aren't all uppity about that sort of thing, it's not really a problem. Java OTH... I don't know. I'm not a Java keener, that's all I'll say :)