RE: A simple java question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Get the Java api doc, look in the java.util package for Calendar.
The correct variable is HOUR_OF_DAY.  You must use the fields as
defined by the API.  Keep a local copy of the API, you will need it.

-Bob


> Look ar java.sun.com , try search
>
> Java.lang.*
>
> Tol
>
>
> -----Original Message-----
> From: redhat-list-bounces@xxxxxxxxxx
> [mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Padiyath
> Sreekumaran
> Sent: Thursday, November 24, 2005 4:59 PM
> To: redhat-list@xxxxxxxxxx
> Subject: A simple java question
>
>
>    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@xxxxxx
> 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@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>

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

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux