|
-
Aug 23rd, 2001, 05:15 PM
#1
Thread Starter
Addicted Member
c++ & java
hello!
I'm learning c++ now and after I've got to know it a bit, I was thinking of learning Java. What I want to know if it is a big step from c++ to java? Is java quit heavy to learn as c++?
thanks!
Last edited by [praetorian]; Aug 23rd, 2001 at 05:20 PM.
[p r a e t o r i a n]
-
Aug 23rd, 2001, 05:25 PM
#2
Member
Java is actually much easier than C++. No pointers and other complex C++ concepts. But Java introduces multithreading and many other new concepts.
-
Aug 23rd, 2001, 05:27 PM
#3
Thread Starter
Addicted Member
so, going from c++ to java wouldn't be too difficult you mean?
-
Aug 23rd, 2001, 05:32 PM
#4
Member
Not that bad. Java was based on C++. As long as you don't program in C++ like in C (i.e., you haven't created classes, you use char arrays instead of Strings, etc), then everything should be cool. Get a good book, especially one by Sams Publishing.
-
Aug 23rd, 2001, 11:09 PM
#5
Dazed Member
Heres some diffrences between C and Java just so you can take a look.
No preprocessor directives: Java treats constant definitions as
static final fields.
No global variables: Java defines an extreamly clean namespace.
Packages contain classes, classes contain methods and fields methods contain variables. Thus there is no possibility for namespace collisions.
Well-defined primative type sizes:
All the primative types in Java have well defined sizes. In C, the size of int, short ,long types is platform dependent, which hampers portability.
Foward References: The Java compiler is smarter then the C compiler in it allows methods to be invoked before being defined. This elimates the need to define function in a header file before defining them in a program file, as is done in C.
No method pointers: C allows the programmer to store the address of a function in a variable and pass that function pointer to other functions. You cannot do this with java methods but you can acheive similiar results by passing an object that implements
a particular interface.
Variable declarations anywhere: C only permitts local variable declarations to be at the beginning of a method or block. Java allows the variable declarations anywhere
within a method or block. --NOTE-- most programmers perfer to keep variable declarations at the top of a block or method however.
Garabage Collection: The Java Virtual Machine performs "Garabage Collection" or
deallocation of memory automatically. This elimates the need for Java programmers to explictly manage memory used by all object and arrays. For instance an object is
eligible for garabage collection if there are nolonger any variables that hold a refrence to that object.
Method overloading: Java programs can define multiple methods with the same name as long as the methods have diffrent parameter lists.
-
Aug 23rd, 2001, 11:58 PM
#6
Fanatic Member
Dilenger, do you have that saved on your computer?
Alcohol & calculus don't mix.
Never drink & derive.
-
Aug 24th, 2001, 12:04 AM
#7
PowerPoster
JAVA IS NOT BASED ON C++!!
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Aug 24th, 2001, 12:37 AM
#8
Dazed Member
Actually yes i do have that saved. But i do remember most of it though. It is one of the most asked questions sometimes so i keep it handy.
-
Aug 24th, 2001, 07:54 AM
#9
Member
Originally posted by sail3005
JAVA IS NOT BASED ON C++!!
I did a report on it at school for an entire year, and I have worked professionally with Java for two years. Trust me, it was designed to fix the problems of C and C++.
-
Aug 24th, 2001, 10:51 AM
#10
PowerPoster
Java was not designed to fix all the problems of c++. It's main goal was to be a portable language, that could go from computer to computer. The syntax may have some sililarities, but you will see those in any oop language. That doesn't mean they are based off of eachother.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Aug 24th, 2001, 01:00 PM
#11
Member
The cross-platformness was the second goal. Making it a better C++ also included the cross-platformness that compiled C++ and even some source C++ lacks.
-
Aug 24th, 2001, 02:03 PM
#12
Dazed Member
I think what the sun developers had in mind when developing Java was making it so C++ programmers wanting to migrate to Java would feel somewhat comfortable with the syantax.
-
Aug 24th, 2001, 04:01 PM
#13
PowerPoster
exactly. which is entirely different than basing a language off of another language. C++ for example, was made to improve C, and make it an OO language, and C++ is based off of C.
Java and C++ are completely different. If you see a similarity, it is probably the syntax, because they are both OO languages.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Aug 25th, 2001, 03:55 PM
#14
Lively Member
java was designed to be the successor of C++ but was bought by Sun and hacked into a interpreted language
-
Aug 25th, 2001, 03:57 PM
#15
Lively Member
here is teh defintion of java from webopedia:
A high-level programming language developed by Sun Microsystems. Java was originally called OAK, and was designed for handheld devices and set-top boxes. Oak was unsuccessful so in 1995 Sun changed the name to Java and modified the language to take advantage of the burgeoning World Wide Web.
Java is an object-oriented language similar to C++, but simplified to eliminate language features that cause common programming errors. Java source code files (files with a .java extension) are compiled into a format called bytecode (files with a .class extension), which can then be executed by a Java interpreter. Compiled Java code can run on most computers because Java interpreters and runtime environments, known as Java Virtual Machines (VMs), exist for most operating systems, including UNIX, the Macintosh OS, and Windows. Bytecode can also be converted directly into machine language instructions by a just-in-time compiler (JIT).
Java is a general purpose programming language with a number of features that make the language well suited for use on the World Wide Web. Small Java applications are called Java applets and can be downloaded from a Web server and run on your computer by a Java-compatible Web browser, such as Netscape Navigator or Microsoft Internet Explorer.
-
Aug 25th, 2001, 04:46 PM
#16
Dazed Member
Exactaly. There is no doubt java being an easier language to learn. But alot of the complexities are taken out of java. For instance Java does not support multiple class inheritance such as C++ does. Java though does support multiple interface inheritance.
-
Aug 25th, 2001, 04:52 PM
#17
Lively Member
-
Aug 25th, 2001, 07:39 PM
#18
Dazed Member
Nope, All i know about smalltalk is that it was developed by XEROX at the PARC(Palo Alto research center). I would like to know more about it though.
-
Aug 25th, 2001, 09:15 PM
#19
PowerPoster
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Aug 25th, 2001, 09:18 PM
#20
Lively Member
An object-oriented operating system and programming language developed at Xerox Corporation's Palo Alto Research Center. Smalltalk was the first object-oriented programming language (Simula was the very first). Although it never achieved the commercial success of other languages such as C++ and Java, Smalltalk is considered by many to be the only true object-oriented programming environment, and the one against which all others must be compared.
-
Aug 25th, 2001, 09:21 PM
#21
Dazed Member
Hummmmm interseting. But which language came first?
Smalltalk was the first object-oriented programming language (Simula was the very first).
You confused me there.
-
Aug 25th, 2001, 09:25 PM
#22
Lively Member
-
Aug 25th, 2001, 09:32 PM
#23
PowerPoster
So, is smalltalk still used commercially today?
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Aug 25th, 2001, 09:38 PM
#24
Lively Member
IBM makes smalltalk development tools so i would think so
-
Aug 25th, 2001, 09:43 PM
#25
PowerPoster
thats cool, i am gonna look into it.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|