Hello
In simple terms concider this.
String a = new String("Hello")
'String' is a type
'a' is a reference variable
'new String("Hello")' is the object created
It is also possible to create the above object with just the following code
without a type or refrence variable
new String("Hello")
Try printing this string object with
System.out.println( new String("Hello"));
It will print.
Remember the 'new' Java keyword creates the object.
If you need further examples or explanations post back a question to the
group.
On Sun, Mar 21, 2010 at 12:48 PM, Jyoti Parmar
<[email protected]>wrote:
> i cant understand what is class , object and their methods and how to
> declare it......please explain it to me .... i need to help to learning a
> java
>
>
> Your Mail works best with the New Yahoo Optimized IE8. Get it NOW!
> http://downloads.yahoo.com/in/internetexplorer/
>
> --
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]<javaprogrammingwithpassion%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/javaprogrammingwithpassion?hl=en
>
> To unsubscribe from this group, send email to javaprogrammingwithpassion+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
To unsubscribe from this group, send email to
javaprogrammingwithpassion+unsubscribegooglegroups.com or reply to this email
with the words "REMOVE ME" as the subject.