.


:




:

































 

 

 

 


Iii




2.

: i i i i Javadoc.

: i i i ii Javadoc.

 

.

package TestWindowsDoc; import java.awt.Window; import java.io.IOException; /** * A base class representing a window on the screen. */ class BaseWindow { public BaseWindow() { } /** * A simple method fo adding two values * @param a the first value. * @param b the second value. * @return the desired result. * @see MyWindow */ public int method(int a, int b) { return a + b; } } /** * <p>, i i i.<br> * A class representing a window on the screen.<br> * For example (): * <pre> * Window win = new Window(parent); * win.show(); * </pre> * * @author Sami Shaio * @version %I%, %G% * @see TestWindowsDoc.BaseWindow */ public class MyWindow extends BaseWindow { /** * The constant value of this field is the largest value of type * {@code char}, {@code '\u005CuFFFF'}. * * @since 1.0.2 */ public static final char MAX_VALUE = '\uFFFF'; /** * A main constructor of this class. * @param p1 the first value. * @param p2 the second value. */ public MyWindow(int p1, String p2) {} /** * A simple file read method. * @param a the first value. * @param b the second value. * @return the desired result. * @exception IOException * if the index is not in the range <code>0</code> * to <code>length()-1</code>. * @see #method(int a, int b) */ public int inputFile(int a, int b) throws IOException { return a + b; } }

 

ii Javadoc .

C:> javadoc -charset "windows-1251" MyWindow.java

 

% javadoc -docencoding "ISO-8859-1" mypackage

 

:

  1. MyWindow.java i i, .
  2. ii , i ii.
  3. ii Javadoc, i i.
  4. ' i i:
    1. @author
    2. @version
    3. @param
    4. @return
    5. @exception
    6. @see
    7. @since
    8. @serial
    9. @deprecated

 


 

3.

: ii i i i.

: i i i.

 

i ii.

, ii i i , ' i ' i ( ) i ii . I i i i i i:

  • i,
  • 'i i,
  • i.

, i i . , i i i i , .

i i i i i i i, i i i, , , ii .

 

  1. , ii .
  2. ' ii i.
  3. ' i i.
class TestThread extends Thread { String threadName; CommonVariable parentClass; TestThread(String name, CommonVariable c) { threadName = name; parentClass = c; System.out.println(threadName + " - Created"); } public void run() { System.out.println(threadName + " - Start of Work"); while (parentClass.state!= true) { System.out.println(threadName + " - " + parentClass.state); try { Thread.sleep(10); } catch (InterruptedException ie) { } } System.out.println(threadName + " - " + parentClass.state); System.out.println(threadName + " - End of Work"); } } public class CommonVariable { boolean state = false; CommonVariable() { state = false; } public static void main(String argc[]) { System.out.println("Main process started"); CommonVariable cv = new CommonVariable(); TestThread t1 = new TestThread("First", cv); TestThread t2 = new TestThread("Second", cv); TestThread t3 = new TestThread("Third", cv); t1.start(); t2.start(); t3.start(); System.out.println("Main process: " + cv.state); try { Thread.sleep(60); } catch (InterruptedException ie) { } cv.state = true; System.out.println("Main process: " + cv.state); System.out.println("Main process ended"); } }

 

Iii

  1. , i i i ii.
  2. ii i. i ii i i .
  3. . , i i. i . i.
  4. . , , . i . i i ii.
  5. . , i i i. i . i i ii.
  6. . , . i . i i ii.
  7. . , i . i . i i ii.
  8. . , i i i , i i . i . i i ii.
  9. . , i i - , i ( ). i . i i ii.
  10. . , i i ( 2). i . i i ii.
  11. . , i i (i - i i). i . i i ii.
  12. ' i. , i i. i . i i ii.
  13. ' i. , i i, . i . i i ii.
  14. ' i. , i i ( i ). i . i . i i ii.
  15. ' i. , i i ( i ) i i i i . i i . i . i i ii.
  16. ' i. , i i ( i ) i i i i . i i . i . i i ii.
  17. ' i. , i i ( i ) i i i i . i i . i . i i ii.
  18. ' i. , i i ( i ) i i i i . i . i . i i ii.
  19. ' i. , i i ( i ) i i i i . i . i . i i ii.
  20. ' i. , i i ( i ) i i i i . i i. i . i i ii.
  21. ' i. , i i ( i ) i i i i . i i. i . i i ii.

 


 

4.





:


: 2016-11-24; !; : 689 |


:

:

, ,
==> ...

1505 - | 1487 -


© 2015-2024 lektsii.org - -

: 0.011 .