9 replies to this topic
#1
Posted 04 December 2010 - 06:26 AM
Hey all.
I'm gonna take a Java programming course starting at the 14th. We're gonna use Windows[duh] and Java Builder or something? I don't remember. That's a great thing to learn, but I wanna know some stuff.
We're gonna work on Windows which I hate. Can you compile and run the exact same code on both Windows and Linux? Would Wine work?
You need to have Java installed to run Java apps. Is there a way I can compile the program so it won't need to have Java pre-installed? When I'm building my programs, I like them to be fast, simple, and portable.
Also, as a C programmer I won't need to start over. What are the general differences[other than OOP] between Java and C?
Thanks.
I'm gonna take a Java programming course starting at the 14th. We're gonna use Windows[duh] and Java Builder or something? I don't remember. That's a great thing to learn, but I wanna know some stuff.
We're gonna work on Windows which I hate. Can you compile and run the exact same code on both Windows and Linux? Would Wine work?
You need to have Java installed to run Java apps. Is there a way I can compile the program so it won't need to have Java pre-installed? When I'm building my programs, I like them to be fast, simple, and portable.
Also, as a C programmer I won't need to start over. What are the general differences[other than OOP] between Java and C?
Thanks.

There is no problem that cannot be solved by the use of high explosives.
|
|
|
#2
Posted 04 December 2010 - 06:44 AM
Quote
We're gonna work on Windows which I hate. Can you compile and run the exact same code on both Windows and Linux? Would Wine work?
Java, like all decent programming languages, is platform independant. You can code something on linux and compile it on windows even if you want to
Quote
You need to have Java installed to run Java apps. Is there a way I can compile the program so it won't need to have Java pre-installed? When I'm building my programs, I like them to be fast, simple, and portable.
Quote
Also, as a C programmer I won't need to start over. What are the general differences[other than OOP] between Java and C?
Quote
You might ask, “Why Java?” That’s a good question, especially if you are new
to the language and have not heard all the buzz about it yet. How does a pro-
gramming language that has only been around since 1995 and is quite similar
in syntax and design to C++ become so widely adopted? Why not just stick to
languages that have been used for decades: C, C++, COBOL, Fortran, and so on?
Relative to the other programming languages used today, Java is in its
infancy. (Sun Microsystems released the first version of Java in 1995.) Yet Java
1
2
Chapter 1
has become one of the most popular languages used in programming today.
Java is an object-oriented programming language with syntax and keywords
almost identical to C++, another object-oriented language that has been used
extensively for over 20 years.
So why learn a new programming language that is similar to an established
programming language? First of all, Java is easier to learn than other object-
oriented languages. When developing Java, its creators took all of the good
features of the existing object-oriented programming languages such as C++,
Ada, and Smalltalk, and removed most of their flaws and peculiarities. There
are a lot of aspects of the Java language that are consistent and make sense,
thereby making it easier to learn.
When I first learned C++ in college, we spent weeks learning just to manip-
ulate and display strings. It was hard to remember which function to use
when, and none of it ever made any sense to me. When I first started to learn
Java, I was immediately impressed with the ease with which strings are han-
dled. It was one of the first simplicities of Java that got me excited about the
language.
I want to emphasize that I did not say Java is easy to learn. I said Java is
easier to learn than other object-oriented programming languages,
specifically C++. You still have some work ahead of you, but I think you
will find that Java is straightforward, powerful, well designed, and an
enjoyable language with which to program.
to the language and have not heard all the buzz about it yet. How does a pro-
gramming language that has only been around since 1995 and is quite similar
in syntax and design to C++ become so widely adopted? Why not just stick to
languages that have been used for decades: C, C++, COBOL, Fortran, and so on?
Relative to the other programming languages used today, Java is in its
infancy. (Sun Microsystems released the first version of Java in 1995.) Yet Java
1
2
Chapter 1
has become one of the most popular languages used in programming today.
Java is an object-oriented programming language with syntax and keywords
almost identical to C++, another object-oriented language that has been used
extensively for over 20 years.
So why learn a new programming language that is similar to an established
programming language? First of all, Java is easier to learn than other object-
oriented languages. When developing Java, its creators took all of the good
features of the existing object-oriented programming languages such as C++,
Ada, and Smalltalk, and removed most of their flaws and peculiarities. There
are a lot of aspects of the Java language that are consistent and make sense,
thereby making it easier to learn.
When I first learned C++ in college, we spent weeks learning just to manip-
ulate and display strings. It was hard to remember which function to use
when, and none of it ever made any sense to me. When I first started to learn
Java, I was immediately impressed with the ease with which strings are han-
dled. It was one of the first simplicities of Java that got me excited about the
language.
I want to emphasize that I did not say Java is easy to learn. I said Java is
easier to learn than other object-oriented programming languages,
specifically C++. You still have some work ahead of you, but I think you
will find that Java is straightforward, powerful, well designed, and an
enjoyable language with which to program.
#3
Posted 04 December 2010 - 06:51 AM
Quote
Java, like all decent programming languages, is platform independant. You can code something on linux and compile it on windows even if you want to

There is no problem that cannot be solved by the use of high explosives.
#4
Posted 04 December 2010 - 07:03 AM
AdvMutant said:
I strongly disagree with you on that. How about Visual BASIC? I say it's crap, but it's still widely used as a Windows programming language. Of course, you have Mono but it's not by Microsoft. Bad example. Say... Assembly. It's pretty decent, if you ask me. And it's VERY platform depended. Even C has different functions and libraries for different platforms.
I don't understand what your saying?
#5
Posted 04 December 2010 - 07:04 AM
That there are many 'decent' platform-specific languages out there.

There is no problem that cannot be solved by the use of high explosives.
#6
Posted 04 December 2010 - 07:59 AM
AdvMutant said:
That there are many 'decent' platform-specific languages out there.
I don't think there are lots of platform independent programming languages like Java.
Lost!
#7
Posted 04 December 2010 - 10:03 AM
Exactly. So you say Java code can run the same on both Linux and Windows without any changes?

There is no problem that cannot be solved by the use of high explosives.
#8
Posted 04 December 2010 - 10:36 AM
AdvMutant said:
Exactly. So you say Java code can run the same on both Linux and Windows without any changes?
Yes!

Because java runs in a virtual machine created by java engine.

You wirte a program, lets say HelloWorld.java and compile it -> HelloWorld.class -> and runs in the JVM(Java Virtual Machine)
If you want to get started... Official tutorial The Really Big Index is the best place.
Lost!
#9
Posted 05 December 2010 - 12:21 AM
Thanks for explaining. ++rep!
PS. Why doesn't MacOS have a mouse? O.o
PS. Why doesn't MacOS have a mouse? O.o

There is no problem that cannot be solved by the use of high explosives.
#10
Posted 05 December 2010 - 01:31 AM
AdvMutant said:
Thanks for explaining. ++rep!
PS. Why doesn't MacOS have a mouse? O.o
PS. Why doesn't MacOS have a mouse? O.o
Ha ha! I noticed now! Mac one got no mouse... Maybe because at the beginning they didn't have mouse....lol
Lost!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









