Hello my teacher and classmates,

I'm studying InputFromKeyboard lesson from Javapassion. I found when
we use swing classes, we sometimes add a statement "Public classname()
{}"(as first two example), while we don't do that sometimes(as the
last example). What is this statement used for? What's the difference
between using it and not using it?

--------------------------
1."public class InputFromKeyboardJOptionPane {

    /** Creates a new instance of InputFromKeyboardJOptionPane */
    public InputFromKeyboardJOptionPane() {
    }"
--------------------------
2. "import javax.swing.JOptionPane;

public class NumWords {

    /** Creates a new instance of NumWords */
    public NumWords() {
    }"
----------------------------
3. "import javax.swing.JOptionPane;

public class Grades {

    public static void main(String[] args) { "
--------------------------------

Thank you very much in advance.

Best regards,
Ning

-- 
To post to this group, send email to javaprogrammingwithpassion@googlegroups.com
To unsubscribe from this group, send email to 
javaprogrammingwithpassion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

Reply via email to