![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: May 2006
Location: Philippines
Posts: 21
Rep Power: 0
![]() |
whats the diference?
Hi!!!....
elow!... im new to java actually and im being confused... on where will i start... it pisses me off cause in our curriculum we shifted from c++ to javascript programming, to be exact its about (BlueJ)... pls help |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Javascript and Java are two completely different things. The similarity in their name suggests some connection, I know, but there is very little in common. Javascript is a scripting language used to add extra functionality to websites. It's interpreted by the browser.
Java, on the other hand, is a cross-platform, bytecode compiled language that is used for a wider range of tasks, from server systems to desktop applications to mobile phone apps. You can think of Java as a cross-platform C++. The languages are fairly similar, though Java lacks some of C++'s advanced features, such as templating or operator overloading, and C++ lacks some of Java's features, such as anonymous objects and advanced reflection capabilities. |
|
|
|
|
|
#3 |
|
Programmer
|
Java != javascript. They are nothing like each other. javascript was the name netscape gave to thier language so that it would look more "cool" as it was around the time java was beginning to be taken seriously.
The only thing C++ and Java have in common is some syntax similarities. Other than that they are two differnt things. C++ compiles to native code, has mutliple inheritance, much greater memory control. Java is Just In Time compiled(JIT) by the runtime and so can run anywhere there is a Java runtime. For me Java is a love/hate relationship. I love the simplicity of it and its RAD capabilities. I hate it sometimes because i have to make comprimises on what i want to do. But other than that its great. I would just like to add that BlueJ is a great way to learn Java. They use it the the university i go to and it makes learning java easier as you can see how classes relate to each other. |
|
|
|
|
|
#4 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
wtf!?!
go read the first chapter, or intro, or preface to the edition, or whatever of ANY javascript book that will tell you they're not the same. jesus... go do some excercise on your personal string pattern matching. hint: look past the first four characters.
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#5 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 317
Rep Power: 4
![]() |
JavaScript is useful for more than just adding interactivity, animation and a bit of form validation to web pages, especially on Win32 systems. It can be used for system administration (though technically MS call their mutant JavaScript "JScript") or in DTS jobs in SQL Server 2000 amongst other things.
Java has more in common with C++ than just some passing syntactical similarities: they are both OOP languages (object oriented programming languages, for the newbies). Java drops a few of the nastier features of some OOP languages like multiple inheritance and operator overloading, but I can't really think of any way in which it is really more restrictive in any concrete way than C++ (other than the fact that it doesn't compile to native code; though that's (a) not that important these days unless your application needs real number crunching speed for some reason and (b) not totally impossible to get around anyway). I don't agree that C++ has "much greater memory control" - Java is perfectly happy to dynamically allocate memory, and what more do you want? Unless you actually actively enjoy taking out your trash, you're not restricted. OK, so you can't do pointer arithmetic, but generally speaking if you're about to do pointer arithmetic you're probably doing something the hard way that would be more maintainable if it was done the easy way anyway. Java is a bit of a spoilsport because it babies you, but that doesn't make it actually more restrictive than C++, just less appealing to hackers who like people to squint at their code and go "ooooooh..." uncomprehendingly rather than "right, I see what that does." Don't get me wrong, I'm not bashing C++, but I felt I should stick up for Java a little there. In many ways it's C++ reworked and polished with a lot of the unnecessary complexity trimmed off the end. Considering that the major cost to companies with in-house software development is development, maintenance and debugging time rather than a few 'wasted' CPU cycles and some partially deflated hacker egos, Java is a real winner. JavaScript is not object oriented; it's what prevaricators in the industry call 'object based.' VB programmers will be familiar with this term, and aware that it doesn't mean much in reality. It's also not byte-code compiled or native-code compiled, but simply interpreted. It's easy to learn but extremely limited. The syntax parallels with Java should make Java easier to learn for you later though.
__________________
"I'm not a genius. Why do I have to suffer?" |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|