On Aug 30, 8:54 pm, "Stephen Hunter" <[EMAIL PROTECTED]> wrote:
> *The output says it is supposed to be:*
>
> s1 = Hello Sang Shin s2 = Hello Sang Shin
> s3 = DummyClass
>
> *I followed the exercise correctly
No, you did not.
>, but here is my output (which is
> different):*
>
> s1 = Hello Sang Shin, s2 = Hello Sang Shin
> s3 = mythisreferenceexampleproject.DummyClass
>
> *My question is:
> Mine shows the project folder before the class. I mean, it did get the class
> name, but it got the package (project folder's) name as well.
> Did I do something wrong or is the exercise miss printed?*
Read again carefully the instructions to create the project, there is
no package specified, just a class.
Depending on the Netbeans version you use, as using the default
package is not recommanded, most recent versions of Netbeans use the
name of the project in lowercase to serve as the package name.
In the exercise, the default package name is used, so you must exactly
enter as the name of the Main class what is written in the exercise,
not preceding by a package name.
But after all, this is the same, the class of an object is the full
name of the class, that is the name of the package if it exists
followed by the name of the class and separated by dot:
no package: DummyClass
a package foo: foo.DummyClass
and so on if the hierarchy is deeper.
>
> Thanks,
> Stephen
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---