silverglade Posted August 6, 2008 Share Posted August 6, 2008 i am going to school for computer programming, and they only teach java. I was wondering, if i learn java, will i be able to pick up php/msql faster? because I am having trouble learning php from books and tutorials, and i was also wondering why schools dont teach php/mysql? any help greatly appreciated, sincerely derek. Link to comment https://forums.phpfreaks.com/topic/118490-going-to-school-question-and-phpmysql/ Share on other sites More sharing options...
Third_Degree Posted August 6, 2008 Share Posted August 6, 2008 Well all languages are fundamentally the same so learning java will get you into a programmer's mindset. It's unfortunate however, that Java and PHP are quite different in many syntaxes, unlike C/C++ and PHP. It won't really help you learn MySQL. Link to comment https://forums.phpfreaks.com/topic/118490-going-to-school-question-and-phpmysql/#findComment-609990 Share on other sites More sharing options...
DarkWater Posted August 6, 2008 Share Posted August 6, 2008 Java and PHP are highly different. Java is strongly typed, whereas PHP isn't, for starters. Also, the syntax is different for many common tasks. Quick examples of several programming languages so you can see how all of them are similar except PHP : Java: public class TestApplication { public static void main(String[] args) { String hello = "Hello, World!"; System.out.println(hello); } } C: #include <stdio.h> int main(int argc, char** argv) { char string[] = "Hello, World!"; printf("%s\n", string); return 0; } C++: #include <iostream> #include <stdlib.h> int main(int argc, char *argv[]) { string hello = "Hello, World!"; cout << hello << endl; return 0; } PHP: <?php $hello = "Hello, World!"; echo $hello; ?> Never written out so many Hello World programs in one post. >_< But as you can see, most programming languages are similar in control structures (if, else) and loops (for, while, do-while) but have drastically different syntax components. For example, variable don't have certain types in PHP, and method signatures need not provide a return value type, whilst in almost every other language (excluding scripting languages), it is necessary, along with providing types for variables. Java has a String type, but it's immutable, C++ has string types, and C is just an array of characters (annoying, because an array of strings is a pointer to an array which is a pointer to a pointer, like char** argv). Anyway, you can see the differences. PHP is easier to learn, by far I'd have to say. P.S: I hate knowing all these programming languages. >_< Link to comment https://forums.phpfreaks.com/topic/118490-going-to-school-question-and-phpmysql/#findComment-610009 Share on other sites More sharing options...
silverglade Posted August 6, 2008 Author Share Posted August 6, 2008 thanks very much for taking the time to show me that. wow you know a lot of languages. but thanks for that feedback. derek ;D i think java will help me think in terms of the basic concepts so i can translate the code constructs into the php language. one of my professors said "programming is programming" im not sure what he meant , but maybe he meant that the languages are more similar than different. derek Link to comment https://forums.phpfreaks.com/topic/118490-going-to-school-question-and-phpmysql/#findComment-610018 Share on other sites More sharing options...
DarkWater Posted August 6, 2008 Share Posted August 6, 2008 Your professor is kind of right, programming is programming. At least you're starting with Java and not C, which is a tad more complicated (because of its basic...ness) and it lacks OOP capabilities (unless you count struct and union). When your professor said "programming is programming", he means that programming has the same fundamental goals regardless of the language, but each language has its own quirks that are drastically different from other ones. Just practice. Best advice I can give. Link to comment https://forums.phpfreaks.com/topic/118490-going-to-school-question-and-phpmysql/#findComment-610022 Share on other sites More sharing options...
silverglade Posted August 6, 2008 Author Share Posted August 6, 2008 great . thank you. derek Link to comment https://forums.phpfreaks.com/topic/118490-going-to-school-question-and-phpmysql/#findComment-610061 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.