Jump to content

I'm gonna study Java

- - - - -

  • Please log in to reply
9 replies to this topic

#1
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
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.

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#2
DEViANT

DEViANT

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 358 posts

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.
Not as far as I know. The end user needs to have the JRE package installed, at least

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?
Quoting from one of my e-books :

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.

:D You should rep+ me so that I can win :D

My Blog | Ask me!
Error : Satan did it

#3
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts

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
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.

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#4
DEViANT

DEViANT

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 358 posts

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?

:D You should rep+ me so that I can win :D

My Blog | Ask me!
Error : Satan did it

#5
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
That there are many 'decent' platform-specific languages out there.

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#6
isuru

isuru

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 233 posts

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
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
Exactly. So you say Java code can run the same on both Linux and Windows without any changes?

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#8
isuru

isuru

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 233 posts

AdvMutant said:

Exactly. So you say Java code can run the same on both Linux and Windows without any changes?

Yes!

Posted Image

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

Posted Image

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
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
Thanks for explaining. ++rep!
PS. Why doesn't MacOS have a mouse? O.o

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#10
isuru

isuru

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 233 posts

AdvMutant said:

Thanks for explaining. ++rep!
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