h1.What is Code Samples?
This Code Samples wiki is a useful collection of example code for developers to use in their programming projects. The example code snippets are added through the combined efforts of Sun staff and developers in the community.
Add code samples that you have found useful and want to share with other developers. Update code samples on the wiki that you know are out of date.
h2.Guidelines
Please use the following guidelines when adding new code examples or updating existing ones:
* Read the Help Tips in the right-hand sidebar that appears on the Edit page page for general formatting tips. To maintain the formatting of a code sample and keep it in mono text, do the following:
{noformat}
{{/*Your code goes here*/}}
{noformat}
* Enter your code sample in the appropriate section already on the wiki, or create a new section in the same formatting as existing topics. Look through several sections of the wiki to understand how each sample is formatted.
* Keep posts fairly short
* Include a link to the source of the code sample if known.
* Do not simply add a link to code samples. Instead, add the sample with some text that links to the source, as shown in this example: [HellowWorld|http://wikis.sun.com/display/code/Hello+World].
* Add only code samples with appropriate text. This is not a conversation board or forum.
* When adding comments, make sure they are appropriate to the example code.
h2.Adding Code Samples to the Wiki
* To add or change code in the wiki, you must first be a Sun registered online user.
* Once you are registered, you must login to edit a page or add a comment
* After adding code to the wiki, click Save
And that's all there is to it.
You do not need to be registered or login to view Code Samples.
This Code Samples wiki is a useful collection of example code for developers to use in their programming projects. The example code snippets are added through the combined efforts of Sun staff and developers in the community.
Add code samples that you have found useful and want to share with other developers. Update code samples on the wiki that you know are out of date.
h2.Guidelines
Please use the following guidelines when adding new code examples or updating existing ones:
* Read the Help Tips in the right-hand sidebar that appears on the Edit page page for general formatting tips. To maintain the formatting of a code sample and keep it in mono text, do the following:
{noformat}
{{/*Your code goes here*/}}
{noformat}
* Enter your code sample in the appropriate section already on the wiki, or create a new section in the same formatting as existing topics. Look through several sections of the wiki to understand how each sample is formatted.
* Keep posts fairly short
* Include a link to the source of the code sample if known.
* Do not simply add a link to code samples. Instead, add the sample with some text that links to the source, as shown in this example: [HellowWorld|http://wikis.sun.com/display/code/Hello+World].
* Add only code samples with appropriate text. This is not a conversation board or forum.
* When adding comments, make sure they are appropriate to the example code.
h2.Adding Code Samples to the Wiki
* To add or change code in the wiki, you must first be a Sun registered online user.
* Once you are registered, you must login to edit a page or add a comment
* After adding code to the wiki, click Save
And that's all there is to it.
You do not need to be registered or login to view Code Samples.