Page 75 - BUKU TEKS SK T4
P. 75

Double

                       public class pembolehUbah {
                             public static void main(String[] args) {
                                   double s, t, u;
                                   s = 0.123;                                     Penetapan nilai
                                   t = 1.1;
                                   u = s+t;
                             }
                       }

                                            public class pembolehUbah {
                       Pengisytiharan &           public static void main(String[] args) {
                       Penetapan nilai                  double s = 0.123, t = 1.1, u = s+t;
                                                  }
                                            }



                    Boolean
                       public class pembolehUbah {
                             public static void main(String[] args) {
                                   boolean v;
                                   v = true;                                     Penetapan nilai
                             }
                       }


                                            public class pembolehUbah {
                       Pengisytiharan &           public static void main(String[] args) {
                       Penetapan nilai                   boolean v = true;
                                                  }
                                            }


                    Char
                       public class pembolehUbah {
                             public static void main(String[] args) {
                                    char w;
                                    w = 'y';                                     Penetapan nilai
                             }
                       }


                                             public class pembolehUbah {
                       Pengisytiharan &            public static void main(String[] args) {
                       Penetapan nilai                   char w = 'y';
                                                   }
                                             }



                        Sains Komputer Tingkatan 4
                 66
   70   71   72   73   74   75   76   77   78   79   80