Tuesday, 22nd June 2010
The new frontier for learning Java

WikiJava:Pages containing code

From WikiJava

Jump to: navigation, search

This page explains how to create a new article containing code in WikiJava.

Contents

General information

The page must be an atomic unit of code, this means that it must contain all the information required to easily understand it, and in particular:

  • What the code does
  • How it does it
  • if particular frameworks or classes not included in the standard API are required
  • if the code uses features which are not supported by all versions of Java which versions support the code
  • It must be clearly stated if the code is connected to code contained in other pages and the links to these pages must be provided.

In order to make it easier to find pages and the code for the users a page containing code must have a title which describes in short the code shown in it.

Creating a new page

WikiJava offers several ways to create a new article. The easiest one is by using the form at this page.

By simply filling the input fields relevant to the new article you want to create you can automatically generate the whole article already populated with the WikiJava standard article structure.

Article names

Particular attention must be paid to the choice of the names for the articles.

Typically the name of an article containing a whole class would be the name of the Class chosen according to the Naming conventions, together with the ".java" file extension.

In case you are not submitting a whole class but just a method, then the name of the article should be the name of the method presented.

In case you are submitting several methods or just some code from a Class or from a method you should use for your article a descriptive name not too long that will facilitate the identification of the page for other users.

In case another article already exists with the same name then you can attach at the end of your new article few distinctive words that explain what's particular about your version of the code.

Examples of article names:

helloWorld.java
cat.java
cat.java recursive
saveEntry
saveEntry JNDI
open File

See Also