Need help! Unable to follow the Sun WBT practice.(Simple program)

Exception in thread "main" java.lang.NoSuchMethodError: main
Due to the above error, I can't follow the Sun's WBT program. I think something is missing in my Java environment since Sun provided instruction should be correct.
Please let me know to troubleshoot this.
Below causes error.(Followed the Sun WBT)
public class Customer {
     public int customerID = 0; // Default ID for the customer
     public char status = 'N'; // default
     public double totalPurchases= 0.0; // default
     // This method displays the value for an item
     public void displayCustomerInfo() {
          System.out.println("Customer ID:" +customerID);
          System.out.println("Status: " +status);
          System.out.println("Purchases: " +totalPurchases);
} // end of display method
} // end of the class
Below works since I did not use WBT instruction:
public class Customer2 {
     public static void main( String args[] ) {
     int customerID = 0; // Default ID for the customer
     char status = 'N'; // default
     double totalPurchases= 0.0; // default
          System.out.println("Customer ID:" +customerID);
          System.out.println("Status: " +status);
          System.out.println("Purchases: " +totalPurchases);
} // end of ????( I do not know how to say here)
} // end of the class

public class Customer {
public int customerID = 0; // Default ID for the customer
public char status = 'N'; // default
public double totalPurchases= 0.0; // default
// This method displays the value for an item
public void displayCustomerInfo() {
System.out.println("Customer ID:" +customerID);
System.out.println("Status: " +status);
System.out.println("Purchases: " +totalPurchases);
} // end of display method
} // end of the class
NOTE: IF I run the above program, it does not run due to exception. I can compile it without error. Since above coding is used in the Sun WBT course, I think I have Java environment problem. Are you able to run the above program?

Similar Messages

Maybe you are looking for

  • Loose reception bars when 3g is turned on

    no matter where I'm at. Why is that? Does the 3g symbol take the place of the bars? I may be fooling myself physchologicaly but it seems a tad faster. Don't really know if it's even working when this happens.

  • QuickTime in Browser

    In Firefox, when I play videos (say on Apple's website for trailers), the video will play, but the toolbar at the bottom (where you can pause, see the bar that shows where you are at in the video - blanking on the name for that at the moment) does no

  • Is sun java studio creator 2 a commanly used developing tool?

    I just downloaded the sun java studio creator 2,but still wonder which IDE the java programmers use in their work.Do they really program application just by the command line? I am a novice in java and what's worse, I don't have any programming experi

  • Finder Commands Very Slow

    We are using a G5 2.3 and a TiBook 800 MHz. Both machine are suffering from the a very slow finder as well in finder own actions, like opening a new window as well in open commands from other applications like Photoshop, AppleWorks, ... Both computer

  • Batch relationship change

    My organization is merging with another and we are currently operating with two domains while the project to migrate all of the object from one into the other is completed.  SCSM is implemented on Domain A, but is syncing object from both domain A an