Results 1 to 4 of 4
- 02-16-2012, 10:31 PM #1
Member
- Join Date
- Feb 2012
- Posts
- 17
- Rep Power
- 0
Can someone help me fix this please?
i did a Display class to call Client class :
package Details;
public class Display{
public static void main (String[] args) {
details d = new details(); \\ HERE IT CANNOT FIND SYMBOL
d.details();
}
}
and the output is :
error: cannot find symbol
CAN SOMEONE HELP ME?
-
Re: Can someone help me fix this please?
Are you sure you have a class called "details" (I've never heard of this class, so presumably it's a class that you've created)? Note that class names usually (and should) start with a capital letter. Also are you missing an import?
- 02-16-2012, 11:40 PM #3
Member
- Join Date
- Feb 2012
- Posts
- 17
- Rep Power
- 0
Re: Can someone help me fix this please?
now i did like this :
import java.util.*;
import java.text.*;
class Customer {
public void printOutput(){
System.out.print ("Morgan");
System.out.print ("Cassia");
System.out.print ("Mayson Ville");
System.out.print ("Oxford Street");
System.out.print ("London");
System.out.print ("LND");
}
}
=====================================
import java.util.*;
import java.text.*;
package Customer; //HERE IS THE ERROR
public class Main{
customer Customer = new Customer();
public void someMethod() {
Customer.printOutput();
}
}
output : error: class, interface, or enum expected
-
Re: Can someone help me fix this please?
You're completely messed up on use of the package reserve word. In short, it isn't used like that. Are you even using packages? Please read the tutorials on packages and imports to see how this is done.


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks