Re: Lab for Topic 2.1 Getting Input from keyboard

15 views
Skip to first unread message

Peter Rauhut

unread,
Mar 6, 2013, 2:01:29 PM3/6/13
to jpassi...@googlegroups.com
That appears to be a default constructor, which would be used if creating an InputFromKeyboardJOptionPane object in another class. Not including it will have the same affect in this instance, since the constructor doesn't do anything and the class doesn't really have any fields to initiate.

On Tuesday, March 5, 2013 8:23:42 PM UTC-6, angela...@gmail.com wrote:
Hi Sang,
 
I have a question on the first lab of lecture 2 (Getting input from keyboard).  In Exercise 2 on the JOptionPane example, you have created a new instance of InputFromKeyboardJoptionPane apart from the main method.  What's the purpose of creating a self instance in this case?  I couldn't find relevant explanation from the lecture pdf file.
 
public class InputFromKeyboardJOptionPane {
     
    /** Creates a new instance of InputFromKeyboardJOptionPane */
    public InputFromKeyboardJOptionPane() {
    }
     
Cheers,
Angela
Reply all
Reply to author
Forward
0 new messages