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 |
:
- MyWindow.java i i, .
- ii , i ii.
- ii Javadoc, i i.
- ' i i:
- @author
- @version
- @param
- @return
- @exception
- @see
- @since
- @serial
- @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 .
- , ii .
- ' ii i.
- ' 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
- , i i i ii.
- ii i. i ii i i .
- . , i i. i . i.
- . , , . i . i i ii.
- . , i i i. i . i i ii.
- . , . i . i i ii.
- . , i . i . i i ii.
- . , i i i , i i . i . i i ii.
- . , i i - , i ( ). i . i i ii.
- . , i i ( 2). i . i i ii.
- . , i i (i - i i). i . i i ii.
- ' i. , i i. i . i i ii.
- ' i. , i i, . i . i i ii.
- ' i. , i i ( i ). i . i . i i ii.
- ' i. , i i ( i ) i i i i . i i . i . i i ii.
- ' i. , i i ( i ) i i i i . i i . i . i i ii.
- ' i. , i i ( i ) i i i i . i i . i . i i ii.
- ' i. , i i ( i ) i i i i . i . i . i i ii.
- ' i. , i i ( i ) i i i i . i . i . i i ii.
- ' i. , i i ( i ) i i i i . i i. i . i i ii.
- ' i. , i i ( i ) i i i i . i i. i . i i ii.
|
|
4.