plomon
12-04-2004, 04:56 AM
Hi there,
I wrote a simple program to display the details of a Customer like this :
_________________________________________________________________
import java.lang.*;
public class Customer
{
String custname;
String custID;
public Customer()
{
custname = "Bob";
custID = "S20010";
}
public void displaydetails()
{
System.out.println("Customer name is " + custname);
System.out.println("Customer ID is " + custID);
}
public static void main(String a[])
{
Customer cust = new Customer();
cust.displaydetails();
}
}
_________________________________________________________________
The compilation went right. But, during the execution part, the follwing error messsage was displayed :
Exception in thread "main" java.lang.NoClassDefFoundError: Customer/java
Please help me sove the problem!! :)
I wrote a simple program to display the details of a Customer like this :
_________________________________________________________________
import java.lang.*;
public class Customer
{
String custname;
String custID;
public Customer()
{
custname = "Bob";
custID = "S20010";
}
public void displaydetails()
{
System.out.println("Customer name is " + custname);
System.out.println("Customer ID is " + custID);
}
public static void main(String a[])
{
Customer cust = new Customer();
cust.displaydetails();
}
}
_________________________________________________________________
The compilation went right. But, during the execution part, the follwing error messsage was displayed :
Exception in thread "main" java.lang.NoClassDefFoundError: Customer/java
Please help me sove the problem!! :)