Results 1 to 4 of 4
  1. #1
    Tuz
    Tuz is offline Member
    Join Date
    Feb 2012
    Posts
    17
    Rep Power
    0

    Default 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?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default 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?

  3. #3
    Tuz
    Tuz is offline Member
    Join Date
    Feb 2012
    Posts
    17
    Rep Power
    0

    Default 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

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •