⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 try2.txt

📁 JAVA编程思想
💻 TXT
📖 第 1 页 / 共 3 页
字号:
              * that continues 
              * across lines 
              */ 




       / *         */ 


            /* This is a comment that 
            continues across lines */ 




               C+ +               
                                                         / / 

            * (                        )                                       / 




            // This is a one-line comment 




  Java 
   ü ü 

                        Java 

                                           18     26 

                                                                                      shhgs@wgqqh.com 



Java                               j av ad oc               JD K 




Javad o c              H T M L                          j avad oeb c 
                                                           W 


     Java 
        j avad o c 
                          / 

                                        d oclets        j avad( o c                    D o cl)ets 


               j avad oa. cs 
                  j av                                 (         JD K 

          / 
          to o l d o cs      u n . com) 
                                  )                                to o l d oJD csK              ( 




     j avad*/co c               o c** 
                                / 

                       )                             (S tan d alon e dH ocM tags )  T  L 

          
   *     (d o@ tag sJavad       )                                                 ( 
   
                                        @                 (i n li n e d oc tags ) 
                                      


       /** A class comment */ 
       public class DocTest { 
           /** A variable comment */ 
           public int i; 
           /** A method comment */ 
           public void f() {} 
       } 




       j avadrivo cate–p 
            p               rivp ate 
                                ackp agb el 
                                     u    ic      p ro te( cate5 d 
                                                             te 

                                                 p riv                 )                    )   ( 



                                            19      26 

                                                                          shhgs@wgqqh.com 



      p u b l ic        p ro te c te d                                c l ass 
                        H T M L                        Java 

                   j avad o c                                       H T M L 
              H    T M L 
 JavadH oT cM  L       H T M L                      H T M L 


         /** 
         * <pre> 
         * System.out.println(new Date()); 
         * </pre> 
         */ 




                         W eb                  H T M L 

         /** 
         * You can <em>even</em> insert a list: 
         * <ol> 
         * <li> Item one 
         * <li> Item two 
         * <li> Item three 
         * </ol> 
         */ 




                                                                             j avad o c 


j avad o c 
         JavaT 
             H   M L                    < h 1 >      < h r> 



                             ü ü 
                                                        ü ü 
                                                                            H T M L 




                JD K                j avad o cc 
                                     j avad o                  j avad o c 


 @se e : 
 @se e               H T M L                     Javad o c       @se e 


                                            20       26 

                                                                     shhgs@wgqqh.com 


           @see classname 
           @see fully-qualified-classname 
           @see fully-qualified-classname#method-name 




Javad o c                                         S ee A l s o 



{ @l ink package.class#member label} 
      @se e              S ee A l s o                           label 


 { @d o c R o o t} 

                                                             ) 
  { @inh e ritD o c } 



   @v e rsio n 



           @version version-information 




   H T M L     v–ve rsio n-inf o rm atioj n 
                    e rsio n avad o c 


   @au th o r 



           @author author-information 




         au th o r-inf o rm atio n                                j avad o c 
                                                                         em ai l 

                              H T M L         –au th o r 




                                          21     26 

                                                                                     shhgs@wgqqh.com 


                                                / 
                                                            H T M L 


@sinc e 


H T M L                                                  JD K                            Java 


@p aram 



        @param parameter-name description 




       p aram e te r-nam e                                          dd ese criripp ti tionn 
                                                                         sc 

      @p aram                                                                         o 


@re tu rn 



        @return description 




           d e sc rip tio n 
  @th ro w s 




        @throws fully-qualified-class-name description 




         fd u le lscy -qrip u al ifnie(d -c l ass-nam e)   / 
                             tio 


 @d e p re c ate d 


 D ep recate 
                                                  22   26 

                                                                     shhgs@wgqqh.com 

                                          @d e p re c ate d 




                      Java 

        //: c02:HelloDate.java 
        import java.util.*; 

        /** The first Thinking in Java example program. 
         * Displays a string and today's date. 
         * @author Bruce Eckel 
         * @author www.BruceEckel.com 
         * @version 2.0 
        */ 
        public class HelloDate { 
          /** Sole entry point to class & application 
           * @param args array of string arguments 
           * @return No return value 
           * @exception exceptions No exceptions thrown 
          */ 
          public static void main(String[] args) { 
             System.out.println("Hello, it's: "); 
             System.out.println(new Date()); 
          } 
        } ///:~ 




                                  
          (     / / / : ~c 02        / / :2    )                § 

              
                          

         
C od e C on v en ti on s f or th e J av a P rogram m i n g L an gu age 
      
                                     (                                     ) 


        class AllTheColorsOfTheRainbow { // ... 




      
        )            referenceel 
                           cam     -cas i ng                                  ( 
                                               

        class AllTheColorsOfTheRainbow { 

                                        23      26 

                                                                                  shhgs@wgqqh.com 


               int anIntegerRepresentingColors; 
               void changeTheHueOfTheColor(int newHue) { 
                   // ... 
               } 
               // ... 
            } 




                     Java                            S u n 




                                                        Java 



                                Java 




T h i n k i n g i n J av a A n n otatedw Sw oluB 
                                    w        .    ruti ceE cku el.d com 
                                                     on G i e                       T h e 

            L 
 1.         + 
                        HelloDate.java                              hello, world 
                                 (                                         “main”   ) 
       / 
               static                                                                   javac 
                        java                                   JDK 

 2.                 ATypeName 

 3.           DataOnly 
 4.                   3              DataOnly                                   main( ) 

 5.                                           storage( ) 
 6.           StaticFun 
 7.                                                                                 / 
                     String 
 8.           AllTheColorsOfTheRainbow 
 9.                                                       HelloData.java               javadoc 
                   Web 


                                            24         26 

                                                                                   shhgs@wgqqh.com 


   10.        docTest                                             javadoc       Web 

   11.            10                      HTML 
   12.            1                                      javadoc                             Web 

   13.                        Overloading.java                     javadoc              javadoc 
                                  HTML                       Web 

   § 


 C+ + 
 reference        (reference)                            C+ +          JavaJavareference 


             Java          h and l e                C+ +                        C+ + 

                                       reference 
                                         reference                                   C+ + 


                                       Java         reference 
                                                      b y reference 

 references            Java      (            )    ( 


o b j ect reference                                              b y val u ey 
                                                                   )                   ect 

                                  reference                                b   valo ub ej 


                                                                         (           ) 
   §§                           static 
sh o rt int l o ng f l o atreferenceu bb lo eo 
   § 
                                                  d o         l e an c h ar b y te 



   §             CD                 S u n      Java 

   § 
       j avac 
         IB M         j i k es                                                            Java 

   §                P y th o n(      w w w . P y th o n. o rg ) 

 mV ak efinl eS 
     ers i o     y s tem       )                        V B A       CV S ( Co ncu rrent 


 CV S 


                                              25         26 

                                                                         shhgs@wgqqh.com 

§¨ h ttp : //j ava. s u n. co m /d o cs /co d eco nv/i nd ex . h tm l       + 2 
                                                  + 




                                         26      26 


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -