How to write professional documentation for java

Hi, I have few application I need to write documentation for. Im ok with the user and serwer technical stuff. But how to write proper documentation for source code? Any tutorial or howto?
Best regards.

Phenom7 wrote:
Hi, I have few application I need to write documentation for. Im ok with the user and serwer technical stuff. But how to write proper documentation for source code? Any tutorial or howto?A pointer: be explicit and specific when writing Javadocs. If your method never returns null, make sure you say so. If it can't accept null as a parameter, be sure to say what the consequence will be if it happens (but it's OK to say the result is undefined!). A well-written method Javadoc will make users of any API you make a lot more happy, rather than keeping them guessing or making them inspect your source code.
It's expected that while the implementation of a method will change, its pre and post-conditions will not. Therefore, having a good method-level Javadoc is critical to both the people counting on your code and the people maintaining your code.

Similar Messages

  • How to write a code for  open new txt file in swing

    hai all,
    now i do one project in java.that project's GUI is Swing. But i don't known swing (basic).So how to write a code for open new txt file and "Open window " in menu item on swing.that means when i click the "New" on menu that time open a new txt file. open also like that type.
    plz give me that code ! very urgent
    Advance Thanks !
    RSK

    Swing Tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/index.html
    Since you don't know the basic of swing read the tutorial, it is for your own good because it is useless if we provide you with a code you don't even understand and how it works.
    If you want a menu read the tutorial about using menus and for opening a file read using JFileChooser.
    note: don't use the word urgent because it implies that your problem is more important than others.

  • How to write  complex sql for this

    Hi ALL,
    I have a requirement like this
    I have 5 tables which i have to join to get the result
    but there no join column to 2 other table.
    I want to get all the applications using cobal,running on UNIX.
    How to write the query for this
    1.APP
    APP_i DESC
    1 Accounts
    2 Payments
    3 order transfer
    4 Order processing
    2.Techgy
    techid techdesc
    1 cobal
    2 Java
    3.APP_Techgy
    APP_I Techid
    1 1
    2 1
    3 1
    4 2
    4.Pltfrm
    pltfmid pltfrmdesc
    1 Windows NT
    2 UNIX
    5.APP_Pltfrm
    APP_I pltfrmid
    1 1
    2 1
    3 2
    4 2
    ouput must be
    APP_i Desc techDESC pltfrmdesc
    3 ordertranfer Cobal UNIX
    Thanks in advance

    This ('descr' in place of 'desc')?
    SQL> select a.app_i, a.descr, t.techdesc, p.pltfrmdesc
    from app_techgy atc,
       app a,
       techgy t,
       app_pltfrm ap,
       pltfrm p
    where atc.techid = t.techid
    and atc.app_i = a.app_i
    and atc.app_i = ap.app_i
    and ap.pltfrmid = p.pltfmid
    order by a.app_i
         APP_I DESCR                TECHDESC             PLTFRMDESC         
             1 accounts             cobal                windows nt         
             2 payments             cobal                windows nt         
             3 order transfer       cobal                unix               
             4 order processing     java                 unix               
    4 rows selected.

  • Writing a documentation for Java-Language

    Im learning Java with the tutorials here at sun.
    Because my english is not best, I write down all "important" things in an own Dokumentation in german language.
    Because there may be some code I write there, it would be useful to write the Documentation as *.java , because these code snipets are better to read then.
    My question: Is there a possibility to write my documentation as *.html file , and the code snippets are same like I would write them in my JCreator-program (I mean, that keywords as int or class are written in blue, for example...) ?
    Thanks in forward
    Martin

    You can use JavaDoc on your own code. To do this you would add comments in your code using the Javadoc comment style:
    * This is JavaDoc
    * Continue your comments here
    * @author this is the author
    * @param describe a paramater here
    * @param describe another paramater here
    * @return this line describes the return value
    Then run the JavaDoc program on your code and it will produce the same kind of html that you see with the Java API html documentation. For more info check out the book Thinking In Java (available for free at www.bruceeckel.com )

  • How to write conversion routine for key figure?

    Our customer has this requirment:
    we need to know the last time of some TV program in BEx report, If a TV program last 500 seconds, we need show the key figure like this:  00:08:20, If a TV program last 100000 seconds, we need show the key figure like 27:46:40 (27 hours and 46 minitues and 27 seconds), If we define a key figure as time,  BW system will report a error that say it is not acceptable time.  If we want to define a integer, but we need display it like hhmmss format.  We know we can write conversion routine for char.  but I don't how to write conversion routine for key figure.   Please give me any hint if any other solutions?
    Edited by: SY DONG on Dec 2, 2010 3:36 AM

    If you want to do in Transformation Layer :
    You can use routine ...break up the seconds into minute hour and seconds
    you will have to handle few cases in this:
    let say your variable lv_seconds holds the number of seconds you want to convert to hour min and seconds
    DATA: lv_seconds type i,
               lv_hrs  type  i,
              lv_sec type i,
              lv_min type i.
    lv_hrs = lv_seconds / 3600
    if lv_hrs >= 1.
    lv_min = (lv_hrs - trunc(lv_hrs))*60
    here again handle seconds if min >60.
    else.
    lv_hrs = '00'.
    lv_min = lv_hrs*60
    It is just hint ..how you can manipulate the seconds to get it...you will have to think about the complete algorithm
    Regards,
    RK

  • How to create a documentation for Badi?

    Hi All,
    how to create a documentation for Badi?
    This step is requested in the OSS note, but not explained how to perform it...
    Thanks and regards,
    Alex.

    Hi All,
    solved. created in SE18
    I noticed, that it is also possible to create such documentation in SE61 *** well,
    Document Class  Implementation Guide chapter (SIMG)
    Chapter   SIMG
    Also the translation of documentation could be done in such way:
    SE63--->Translation--->ABAP OBjects--->Transport object:
    R3TR DSYS SIMGbadi_name_goes_here
    Regards,
    Alex

  • How to write Select statement for this codition

    I need to check whether SGTXT contains BELNR value.
    SGTXT is a text field and It should be matched with BELNR
    How to write select statement for this.
    Select AUGBL AUGDT into t_BSAD
    from BSAD
    where SGTXT should have the given BELNR Value.
    Plz note : Here I cannot give as SGTXT = BELNR as coz BELNR have only 10 digits.

    Hi,
    data temp(12).
    concatenate '%' belnr '%' into temp.
    Select AUGBL AUGDT into t_BSAD
    from BSAD
    where SGTXT like temp.
    If belnr is having multiple values,just create a internal table as follows.
    types : begin of ty,
            belnr....
            temp(12),
            end of ty.
    data itab_ type standard table of ty.
    data wa type ty.
    loop at itab into wa.
    concatenate '%' wa-belnr '%' into wa-temp.
    modify itab from wa index sy-tabix transporting temp.
    endloop.
    Change your select statement accordingly.
    Kindly reward poits if it helps.

  • How to write a cursor for mutiple columns in forms urgent required.........

    i created one table rk with 8 columns and that i designed in forms.
    but i have another table grk with 4 columns.
    this grk contains data.
    this grk 4 columns data i have to retrive in rk table in froms by multiple records.
    the both column names are same in the both tables.
    because by seeing this 4 columns data i will insert remaining 4 column by entering in rk table in form.
    i known that i have to write cursor to retrive the 4 columns data for multiple record from grk table and in trigger i have to produce to rk table.
    i have worked but it is not working.
    can any body help me out how to write a cursor for 4 column to retrive multple records in form

    Hi,
    Try,
    DECLARE
            CURSOR Cur_Test IS SELECT <field_1>, <field_2>, <field_3>, ... <field_n> FROM <table_name> WHERE <condition>;
    BEGIN
            OPEN Cur_Test;
            LOOP
                    FETCH Cur_Test INTO <items_or_variables>;
                    EXIT WHEN Cur_Test%NOTFOUND;
            END LOOP;
            CLOSE Cur_Test;
    END;Regards,
    Manu.

  • How to write sql query for counting pairs from below table??

    Below is my SQL table structure.
    user_id | Name | join_side | left_leg | right_leg | Parent_id
    100001 Tinku Left 100002 100003 0
    100002 Harish Left 100004 100005 100001
    100003 Gorav Right 100006 100007 100001
    100004 Prince Left 100008 NULL 100002
    100005 Ajay Right NULL NULL 100002
    100006 Simran Left NULL NULL 100003
    100007 Raman Right NULL NULL 100003
    100008 Vijay Left NULL NULL 100004
    It is a binary table structure.. Every user has to add two per id under him, one is left_leg and second is right_leg... Parent_id is under which user current user is added.. Hope you will be understand..
    I have to write sql query for counting pairs under id "100001". i know there will be important role of parent_id for counting pairs. * what is pair( suppose if any user contains  both left_leg and right_leg id, then it is called pair.)
    I know there are three pairs under id "100001" :-
    1.  100002 and 100003
    2.  100004 and 100005
    3.  100006 and 100007
        100008 will not be counted as pair because it does not have right leg..
     But i dont know how to write sql query for this... Any help will be appreciated... This is my college project... And tommorow is the last date of submission.... Hope anyone will help me...
    Suppose i have to count pair for id '100002'. Then there is only one pair under id '100002'. i.e 100004 and 100005

    Sounds like this to me
    DECLARE @ID int
    SET @ID = 100001--your passed value
    SELECT left_leg,right_leg
    FROM table
    WHERE (user_id = @ID
    OR parent_id = @ID)
    AND left_leg IS NOT NULL
    AND right_leg IS NOT NULL
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to write a PCR for this ?

    Hi SAP-HR Experts .
    Dear friends , My Company Requires a specific requiremnt that at the date of any Employee's
    B'day his one day salary should get doubled and he is entitled to get one leave on his B'day .
    I do not know how to write a PCR for this ?
    May some Body tell me how to meet this requirement Please .
    tell me please step by step how to go through ...
    It will be great help for me .
    Best regards : rajneeesh

    I think you can make it with something like this:
    Write a PCR in schema, you can call the rule with "actio";
    000860 ACTIO 9BIR AR               Birthday
    Rule 9BIR
    9BIR Rule for Birthday
            NUM=FG C   Set                   " F (fixed indicator for deadline calculation); G (Birth date from infotype 0002);C (complete months)
            NUM/12     División              " Number of completed months divided by  12
            NUMV0O2L   Off.Lng en arg.var.   " the last two places of the number are entered in the variable argument.
                                " if the rest is not 00, there is nothing to do
              00                             " if the rest is 00
                ZERO= N    AmtNumRteZeit = 0 "
                AMT=  1002 Set               " wagetype of  salary
                AMT/TKDIVI División          " divides the amount by  Partial Period Parameter Whole Month
                ADDWTI1002 Input table       " accumulates into 1002
    Example: an employee with birthday 01.01.1977 in IT0002
    Payrroll in january 08
    wagetype 1002 before rule 9BIR:
    3 1002 Salario Bas01                           30,33  30,00              909,90
    Rule 9BIR
    NUM=FG C   Set; NUM= 372
    NUM/12        ; 372/12= 31 rest=00
    AMT=1002      ; AMT= 909,90
    AMT/TKDIVI    ; 909,90/31= 29,35
    ADDWTI1002    ; 909,90 + 29,35= 939,25
    wagetype 1002 before rule 9BIR:
    3 1002 Salario Bas01                           30,33  30,00              939,25
    Hope this helps. Manuel

  • How to write a code for cumulative values..

    Hi
    Can any one proivde the Sudo code for Customer exit at Reports.
    I need to write a code for when ever user input Calaender month then querry calucalate the cumulative values also.
    How to write a code for cumulative values..
    Example:
    Customer -Sales.Quantity(CalMonth)---   Sales.quantity(Cumulative Month)  
    1000--223--
    2200
    Regards
    mannev.

    hi mannev,
    to get an idea, search in SDN
    for example
    customer exit code
    with hopes,
    Raja Singh

  • Can any one please tell me how to write labview program for data logging in electric motor bike.

    Can any one please tell me how to write labview program for data logging in electric motor bike. I am going to use CompactRIO for getting wide range of data from various sensors in bike. I need to write labview program for data logging of temperature, voltage and speed of the bike. Can any one help me?

    Yes, we can.   
    I think the best place for you to start for this is the NI Developer Zone.  I recommend beginning with these tutorials I found by searching on "data log rio".  There were more than just these few that might be relevant to your project but I'll leave that for you to decide.
    NI Compact RIO Setup and Services ->  http://zone.ni.com/devzone/cda/tut/p/id/11394
    Getting Started with CompactRIO - Logging Data to Disk  ->  http://zone.ni.com/devzone/cda/tut/p/id/11198
    Getting Started with CompactRIO - Performing Basic Control ->  http://zone.ni.com/devzone/cda/tut/p/id/11197
    These will probably give you links to more topics/tutorials/examples that can help you design and implement your target system.
    Jason
    Wire Warrior
    Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!

  • How to write the logic for extending Idocs...

    Hi,
          Can anybody pls explain how to write the logic for extending IDOCs with an example...
          Good suggestions can be appreciated..
    Regards,
    Ram

    Hi Ram,
    Generally the IDoc user exit is called at the following places:
      1) When the control record is read.
      2) After each and every segment in the data record
      3) At the end of the data segment processing.
    The IDoc user exit interface generally imports IDOC_DATA (data record internal table) table. Now the data records in the internal table should appear in the same order as maintained while defining IDoc structure (WE30 transaction). For SAP standard segment SAP code will take care of this. For extended segment you will have to take care of this aspect by appending the Z-segment in the IDOC_DATA table.
    You can do this by:
             looping at IDOC_DATA table:
                 - Do a case-endcase fo IDOC_DATA-SEGNAM (This stores the segment 
                   structure as per the hierarchy).
                 - Within the case for "Z-segment" you can write the logic for appending
                   the Z-segment to IDOC_DATA-SDATA.
    Hope this gives some clue.
    Regards,
    Gajendra.

  • How to write Error message for select options?

    Hi
    i have this select option statement
    SELECT-OPTIONS: s_fevor FOR afko-fevor.
    how to write error message for this?
    Regards
    Smitha

    Error messages are displayed for Select-options mostly on two conditions:
    1) You needs to check wether a value is entered or not its done by:
    a)
    Select-options:SELECT-OPTIONS: s_fevor FOR afko-fevor Obligatory.
       In this case error message is automatically throwed by system.
    b) You can do this in Selection Screen events.
    Ex:
    AT SELECTION-SCREEN./AT SELECTION-SCREEN ON S_FEVOR.
    IF S_FEVOR-LOW IS INITIAL.
    MESSAGE 'XXXXX' TYPE 'E'.
    ENDIF.
    2) You need to Validate the entered value:
    You can do this in Selection Screen events.
    Ex:
    AT SELECTION-SCREEN./AT SELECTION-SCREEN ON S_FEVOR.
    SELECT FEVOR
                 FROM AFKO
                 INTO AFKO-FEVOR
                 UP TO 1 ROWS
    ENDSELECT.        
    IF SY-SUBRC NE 0.
    MESSAGE 'XXXXX' TYPE 'E'.
    ENDIF.
    Regards,
    Gurpreet

  • Documentation on how to write hw drivers for LabView RT.

    I would like to find docs on how to write hw drivers that will work in RT.

    NI Developer Zone: Using the PXI Driver Development Wizard and NI-VISA o Register-Level Program a PX...
    This document is not specific to RT, but applies to RT the same way it does to Windows.
    Similar question

Maybe you are looking for

  • Mixing RAM Manufacturers?

    My apologies if this has been asked before; I searched the forum but couldn't find anything that answered my question properly. So-called 3rd party Memory is new territory for me. I'm looking to upgrade the RAM in my iMac at home; it's a late 2006 20

  • Memory full error

    I'm getting "memory full error" during generation of report. CR version is 8.5. The report contains 2 sub reports. Can anyone suggest what exactly the problem is and what could be the solution ... ?? Thanks in advance ...

  • IPhone 5S Blue Screen of Death: seemingly no options left, any ideas?

    Purchased my iPhone 5S in Nov 2013, haven't had any problems until mid-December. Made the jump from iOS 7.? to iOS 8.1.2. Afterwards, I started noticing that when I would plug the phone into any cable that it wouldn't sense a charge, would need to re

  • To execute external command using   RFC_REMOTE_exec

    Hi i want to execute the ext command using RFC_REMOTE_EXEC . i have used like below in WINDOWS XP: data: v_cmnd(120) type C VALUE 'dir C:\SAP\rfcsdk\bin >RFEXEC -D ESM_R'. call function 'RFC_REMOTE_EXEC' destination D_DESTI exporting command = v_cmnd

  • "Increase database size" popup on gmail

    When accessing gmail through Safari, I get a popup that says "Increase Database Size?" It then subtexts "Do you want to allow "mail.google.com" to increase database size to 10 MB?" The options are cancel or increase.  How do I make this popup stop?