FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Java





ccer
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??
MrBlueSky
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. Smile
Kelcey
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.
per_madsen_aalborg
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
muzzz
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 Wink

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.
per_madsen_aalborg
#muzzz

Could you give an example of the difference between passing "by reference" and passing a "reference by value"

Best Regards,

Per
MrBlueSky
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:

Code:

x.a = 3
x.a = 666


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.
okullar
Java is much more complex and proffesional language, I think. C# is also very good.
MrBlueSky
okullar wrote:
Java is much more complex and proffesional language, I think. C# is also very good.


I agree on both points.
per_madsen_aalborg
#MrBlueSky

Thanks, now I understand the point Cool

Best Regards,

Per
Related topics
Java Game
Java
Add to favorites script - Java
Problems with Java
Java Programming Introductory
Language
DSP Tutorial with Java Applets
Java
[JAVA TUTORIALS & FILES] - Java Scripting world
JAVA Forums
JAva HELP
SQL in java
Java hosting
How to make an execution file (*.exe) for java program?
Java download question
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.