Saturday, May 22, 2010

Javav and c++ and C?

Can someone tell me the pros and cons of java, c, c++ programing and what kind of situations each is used for? im not really sure and oject oriented language is.

Javav and c++ and C?
First of all


C comes first and its not object oriented


C++ is complimenatry to C n it is object oriented.


Java came after them....its next step to c++





* C++ was designed as an extension of the C programming language. To this procedural programming language designed for efficient execution, C++ has added support for statically-typed object-oriented programming, exception handling, scoped resource management, and generic programming, in particular. It also added a standard library that includes generic containers and algorithms.





* Java was created initially to support network computing. It relies on a virtual machine to be secure and highly portable. It is bundled with an extensive library designed to provide a complete abstraction of the underlying platform. Java is a statically typed object-oriented language that uses a syntax similar to C, but is not compatible with it. It was designed from scratch, with the goal of being easy to use and accessible to a wider audience.








JAVA


pro's


*Platform independent (run on linux+windows n othrs)


*Dynamic(Garbage collection technique is used)


*portable(can take this bytecode n run anywhr)


*No pointer thats why safer.





Cons


*interpretated thats why bit slower in earlier versions.


*Not useful for system programming.(no pointer)


*call through the Java Native Interface.





C++


Pros


*Faster Compiled.


*allows direct calls to native system libraries


*parameters passed by value or by reference


*C++ Standard Library has a decent scope (Language support, Diagnostics, General Utilities, Strings, Locales, Containers, Algorithms, Iterators, Numerics, Input/Output and Standard C Library. Platform-specific libraries differ for threads, Network I/O and GUI Programming)





CONS


*Not safe


*operator overloading


*explicit memory management, garbage collection optional via library


*exposes low-level system facilities








For comparison between C %26amp; C++





please visit...my blog


http://nirajzwebblog.blogspot.com/2007/0...








hope this will help


Cheers:)
Reply:Javascript is a popular language and is used in many professional websites. It's more useful to use HTML because Javascript is like the cream in the oreo, and the HTML is the cookie that makes it better.





Pros -





-Being client-side, JavaScript is very fast because any code functions can be run immediately instead of having to contact the server and wait for an answer.





-JavaScript is relatively simple to learn and implement.





-JavaScript plays nicely with other languages and can be used in a huge variety of applications. Unlike PHP or SSI scripts, JavaScript can be inserted into any web page regardless of the file extension. JavaScript can also be used inside scripts written in other languages such as Perl and PHP.





-Being client-side reduces the demand on the website server.





Cons -





-Because the code executes on the users' computer, in some cases it can be exploited for malicious purposes. This is one reason some people choose to disable JavaScript.





-JavaScript is sometimes interpreted differently by different browsers. Whereas server-side scripts will always produce the same output, client-side scripts can be a little unpredictable. Don't be overly concerned by this though - as long as you test your script in all the major browsers you should be safe.





(Source - http://www.mediacollege.com/internet/jav...





Now, C and C++ is a language that is used for programming some games. I'm currently trying to create a simple game, and it's pretty complicated. I can't give too much information, but if you're interested in learning, I suggest you go to this site: http://www.cplusplus.com/doc/tutorial/ (for C++) and this site: http://www.cyberdiem.com/vin/learn.html (for both)
Reply:look if you want to learn computer language it will take for ever but well worth it.





im not going to go into deep expination cause u wont understand.





java is a program that usually runs everything it is the base to make the program work like for example games on the computer they have to run java for them to work it is basically wat supports the game.





c and c++ are used to code in the game for example you would have to make a code to the game to make a certain thing happen it is a very complicated language and is also used for hacking thats if you can first decode it. i know this sounds confusing but you should buy a book its about 1000 pages long describing how to use java and c++ it is well worth it i have read it twice now and still dont understand some things and C++ is used in all computers now so its like a universal language with it you can command ur computer to do anything





mess around with your command prompt you will find more intresting things there





sorry for the long *** letter hope this helped u understand more about it
Reply:read this link:





http://en.wikipedia.org/wiki/Comparison_...
Reply:c and c++ are similar, the main difference being that c++, like java allows the use of object programming which can be very useful once understood. Java is useful in that it is supported on virtually every machine and web browser. If you want to make games and post them on a web site then java is probably the way to go. The downside of java is that it tends to be slightly slower (not good for intensive graphics). Java, in many situations is a little farther removed from the a lot of the "dirty work", but this can make it more difficult to do things that interact with hardware besides basic input/output(typically advanced programming anyway). Personally, i like c++.
Reply:Wow - ask a simple one, like "what's the meaning of life"!





Historically speaking, C is the ancestor of C++ and, in many ways, Java as well.





All three are block-structured programming languages. That means that subsections of programs hide things from other subsections.





All three are linear, iterated languages. That means that collections of things must be addressed one at a time by some sort of looping control structure.





C was created initially to make writing operating systems easier. It's very good for low-level, hardware-oriented programming (it's useful for other things as well, but I'm going to remain relatively simple here).





C++ extended C by introducing Object Oriented Programming (OOP) practices and structure to the pre-existing constructs of C. Bjarne Stroustrup took the C notions of structures and typedef, ramped 'em WAY up, and produced a new language intended to foster the OOP principles, e.g., inheritance, encapsulation, etc. in a language that programmers would be able to grasp relatively more swiftly by virtue of its basis in C.





C and C++ are true compiled languages. That means that the source code is converted by a program called a "compiler" into object modules which can be linked with other modules to produce "executables," files that can be run on particular machines. Programs compiled in this fashion can only be run on particular operating systems. The same source code COULD be recompiled to run on other systems, but you have take that (those) extra step(s).





Java, like C++ is an OOP language.Java was developed by James Gosling to leverage much of the pre-existing knowledge of C++ programmers while removing the execution context from particular operating systems to something call a "virtual machine." "Compiling" Java doesn't produce code that can run on a particular operating system - it generates code that will run a Java Virtual Machine (JVM). A JMV is an executable program (like C/C++) compiled to run on any particular operating system - compiled in the traditional sense. Then, Java programs need not be compiled for different operating systems. They are compiled once for the JVM. It's the responsibility of anyone who write a JVM program to make sure the the standard version of the Java code will work. The virtue of this is that programmer doesn't have to manage the compile-for-different-systems stuff. The Java programmer writes once, runs anywhere (that there's a JVM).





All of these languages are good for just about anything that you'd ever need to program. I've used them all, but lately moved into the Java universe almost entirely. This is not a cut at C or C++, simply that there's more Java in the Web universes that I inhabit.





That was the view from ten-thousand feet.


No comments:

Post a Comment