About Code Samples

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.

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.
  • 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.

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.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Nov 07, 2008

    47K77779 says:

    thanks public class phucbt{ public static void main (String[]args) Unknown macr...

    thanks
    public class phucbt{
    public static void main (String[]args)

    Unknown macro: { System.out.println("My name Bui Ta Phuc - Phucbt"+"n"); System.out.println("hero_zero and 47K77779 - Phucbt"+"n"); }

    }

  2. Sep 27

    Jen_s says:

    do you have a program of a summary count that are use in text file?

    do you have a program of a summary count that are use in text file?

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact