I want to learn Java. Can anyone help me find some good tutorials? If you have the link please tell me.
What are the benefits of learning Java??
The most comprehensive online Java tutorial: http://java.sun.com/docs/books/tutorial/
The best way to start!
Some books on Java you can download for free: http://www.computer-books.us/java.php
And why learning Java? That's something you have to figure out for yourself. 
| ccer wrote: |
I want to learn Java. Can anyone help me find some good tutorials? If you have the link please tell me.
What are the benefits of learning Java?? |
I don't know if there are any benefits of learning java... really it's the same for any language. Each language does some stuff differently than others. That's all "learning" java becomes... really just the differences between java and something you already know. For example, there aren't "pointers" in java, just references. All objects are passed by reference in java.
Hi,
To give you a good answer you need to give us more details.
Like ...
- Why are you going to learn Java?
- What are you starting point? Do you know any other programming languages?
Best Regards
Per
| Kelcey wrote: |
| ccer wrote: | I want to learn Java. Can anyone help me find some good tutorials? If you have the link please tell me.
What are the benefits of learning Java?? |
I don't know if there are any benefits of learning java... really it's the same for any language. Each language does some stuff differently than others. That's all "learning" java becomes... really just the differences between java and something you already know. For example, there aren't "pointers" in java, just references. All objects are passed by reference in java. |
Tsk tsk... java never, ever passes by reference. Likewise, it never passes objects. Instead, it passes primitive types and references (to objects) by value. Not a meaningful difference at first glance, but good to remember for later on
That aside, each programming language has it's own benefits and drawbacks. Java for example, is relatively easy to learn (compared to, say, C++) and platform independent. But you don't have as much access to system resources as some other languages have.
#muzzz
Could you give an example of the difference between passing "by reference" and passing a "reference by value"
Best Regards,
Per
| per_madsen_aalborg wrote: |
Could you give an example of the difference between passing "by reference" and passing a "reference by value"
|
In VB.NET:
| Code: |
Imports System
Public Class SomeClass
Public a As Integer
End Class
Public Class TestSomeClass
' Reference is passed by reference
Public Shared Sub TByRef(ByRef par As SomeClass)
' We change the reference to another reference
par = New SomeClass()
par.a = 666
End Sub
' Reference is passed by value
Public Shared Sub TByVal(ByVal par as SomeClass)
' We change the reference which is passed by value
' This changes are lost
par = New SomeClass()
par.a = 777
End Sub
Public Shared Sub Main()
Dim x As New SomeClass()
x.a = 3
TByVal(x)
Console.WriteLine("x.a = " & x.a)
TByRef(x)
Console.WriteLine("x.a = " & x.a)
End Sub
End Class
|
Compile and run it.
The output:
You can't do this in Java, because, as muzzz already pointed out:
| muzzz wrote: |
| ... java never, ever passes by reference. Likewise, it never passes objects. Instead, it passes primitive types and references (to objects) by value. |
Java is much more complex and proffesional language, I think. C# is also very good.
| okullar wrote: |
| Java is much more complex and proffesional language, I think. C# is also very good. |
I agree on both points.
#MrBlueSky
Thanks, now I understand the point
Best Regards,
Per