Hi Béatrice,

On Aug 21, 9:40 pm, Béatrice [email protected]
<[email protected]> wrote:
> Hi
>
> During homeworks, we had to create classes :for example
> nameClass.java with a main class in it, and nameClass.main.
> Can someone tell me the difference ?
I do not understand what you're meaning here?
All Source-Code files in java end with the extension ".java".
When you compile the source code it gets translated into byte code and
the
files get the extension ".class".

A main class is a class containing the method:

public static void main(String args[])

When you launch a java program you give a class with the whole
package
tree and the java -executable searches for a method with the
signature
given above.

> When we begin a project in java, which one do we have to create ?

It doesn't matter with which one you begin. You have to think about
how
you're architecture will look like, what logic you put in which
class.
When the result of the project is an program you need a class where a
main method is available. If you're developing a library you may even
have no
main method for the user of your library, but for testing purpose
there
may be one.
> I just begin in java and I'm not sure to do well.
> Thank you for your help.
Therefore you're attending this course, which I have attended in the
4th session,
but still like to give all newcomers help.

HTH
Ewald

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

Reply via email to