Search:

Type: Posts; User: haliza hadi

Search: Search took 0.08 seconds.

  1. Replies
    1
    Views
    1,515

    Cannot find symbol error in my java code

    My person class in package DBManager is giving an ArrayList<Person> error..as cannot find symbol. I've recheck and recheck still cannot find a way. Please help...

    cannot find symbol
    symbol:...
  2. Replies
    1
    Views
    1,810

    Implementation using java servlet

    How do i write java code using net beans to implement view/update/response page using the controller/dispatcher technique?? I am new to this and have no basic servlet experience. Please help b-(
  3. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    Ok after changing in GreetingCard, i made these changes in ECardPrinter as follows:
    for(GreetingCard gc : cards){
    System.out.println(gc.formatMessage()+"Date :"+gc.arrivalDate);
    }
    ...
  4. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    What if i change my compareTo as below...pls help
    public int compareTo(GreetingCard other){
    if(arrivalDate.before(other.arrivalDate)){
    return -1;
    }
    else{
    ...
  5. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    wait i forgot to attach the abstract parent class and the subsequent child class


    import java.util.Date;
    public abstract class GreetingCard implements Comparable<GreetingCard> {
    public...
  6. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    There are no error messages...however when i implement the Collections.sort(cards) and then do a println, the output are not sorted by date...below is my code


    import GreetingCard.*;
    import...
  7. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    And in addition to the sorting problem...how do i use attributes from another package???I have tried importing the package but it won't work...pls help :(
  8. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    Ok ignore my questions..its ask by my friends huhu... btw i'm using Collections.sort and my sort does not do the sorting...
  9. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    Will there be lots of changes if i declare my parent class GreetingCard to private? And what does private class do to the other class in the same package?
  10. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    What is the function of the interface Comparable<GreetingCard>?
  11. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    Yes i did change the spelling for compareTo



    import java.util.Date;
    public abstract class GreetingCard implements Comparable {
    String message;
    Date arrivalDate;

    ...
  12. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    I try to work out the error in my child class but to no avail...what does this error mean??
    BirthdayCard is not abstract and does not override abstract method compareTo(Object) in Comparable
    ----
  13. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    ok..i've found the spelling for method "compareTo"
  14. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    which spelling do i need to correct and from which class??
  15. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    import java.util.Date;
    public abstract class GreetingCard implements Comparable {
    String message;
    Date arrivalDate;

    GreetingCard(String message, Date arrivalDate){
    ...
  16. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    [/code]
    import java.util.Date;
    public abstract class GreetingCard implements Comparable {
    String message;
    Date arrivalDate;

    GreetingCard(String message, Date arrivalDate){
    ...
  17. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    How do i post in code tags?
  18. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    ok so i know i have to override the abstract method compareTo, but how should i code it in my other extends class?I am a beginner for object oriented programming so pls guide me huhu
  19. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    This is parent class
    import java.util.Date;
    public abstract class GreetingCard implements Comparable {
    String message;
    Date arrivalDate;

    GreetingCard(String message, Date...
  20. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    I'm still getting this same error messages. Sorry this is my first try doing object oriented programming #:-s
    I did re-check my spelling and caps everything seems to be fine to me. Cud u pls check...
  21. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    ok got it thanks...the compiler is unforgiving...:))

    --- Update ---

    ok now i have this error :BirthdayCard is not abstract and does not override abstract method compareTo(object) in...
  22. Replies
    38
    Views
    3,564

    Re: Calling constructor error

    so if i change my code in parent class to just greetingCard(String m, Date d){} i'm getting error now in my parent class. SO how should i write the code in?
  23. Replies
    38
    Views
    3,564

    Calling constructor error

    Hi i'm trying to call super constructor but found the error :call to super must be first statement in constructor.

    This is my code in parent class (NO ERRORS)
    import java.util.Date;
    public...
Results 1 to 23 of 23