A simple java question

From: Padiyath Sreekumaran (kumar.padiyath_at_psi.ch)
Date: 11/24/05

  • Next message: Frank W. Zammetti: "Re: A simple java question"
    To: redhat-list@redhat.com
    Date: Thu, 24 Nov 2005 15:58:39 +0100
    
    

       Hello,
       This is not a Java mailing list. Since many of the linux experts and java
    experts
       read this mailing list I am sending my simple java question. Iam new to
    this
       Java language. Iam having these lines in my Java code which gives me
    error.

       Part of the code is:
    -----------------------------------------------

     import java.util.*;

     class ClockTalk {
             public static void main(String[] arguments) {
             GregorianCalendar now = new GregorianCalendar();
             int hour = now.get(Calendar.HOUROFDAY);
     }
    }

       When I compile this Java code I get the following error:

     % javac ClockTalk.java
        
    ClockTalk.java:6: cannot resolve symbol
    symbol : variable HOUROFDAY
    location: class java.util.Calendar
             int hour = now.get(Calendar.HOUROFDAY);
                                        ^
    1 error

      My java version is java version "1.4.2_08". Iam running this Linux RedHat
    V3 OS.
      Which library Iam missing? How can I solve this problem?

       Regards,
       Kumar
    ------------------------------------------------------------------
    Padiyath Sreekumar | Tel: +41.56.310.3643
    Paul Scherrer Institut | email: kumar.padiyath@psi.ch
    AIT | Office: WHGA/U132
    WHGA/U132 | Fax: +41.56.310.3649
    CH-5232 Villigen PSI |
    Switzerland |
    -----------------------------------------------------------------

    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Frank W. Zammetti: "Re: A simple java question"

    Relevant Pages

    • RE: A simple java question
      ... This is not a Java mailing list. ... Since many of the linux experts and ... read this mailing list I am sending my simple java question. ... Iam having these lines in my Java code which gives me ...
      (RedHat)
    • Re: compile javac help needed for beginner. apparently it doesnot understand the word extends?????
      ... | I have installed Java from Sun site to my Windows XP. ... java or javac. ... them in one file and compile them together, ... Customer.java:1: cannot resolve symbol ...
      (comp.lang.java.programmer)
    • Re: A simple java question
      ... HOUROFDAY is not a valid field of the Calendar class as per 1.4.2 javadocs. ... Yahoo: fzammetti ... Since many of the linux experts and java ... Iam having these lines in my Java code which gives me ...
      (RedHat)
    • [Help Please] Graphics programming problem.
      ... display image1 ... wait until image1 is drawn to the screen ... What happens is that Java ... PokerDice.java cannot resolve symbol ...
      (comp.lang.java)
    • Re: Cant read file when called from Applet?
      ... compile.bat is throwing these errors in javac *.java line ... wassup.java:261 cannot resolve symbol ... caret below M of Misc ... java.specification.vendor = Sun Microsystems Inc. ...
      (comp.lang.java.help)