Home   Info   DevZone   Wiki  
UsersWeb  |  MainWeb  |  InfoWeb  |  DevZoneWeb  |  SupportWeb
OrgJosExampleJava ] [ not logged in ] [ Web: Imported ] goto:  options
[ get info on or edit ] login or new user ] [ list of topics, hubs & nodes, or recent changes ]

This is an example of a class which will be properly formatted in an html browser. Because html uses special characters, to do special things, classes which you just copy into the edit window will not appear right on web pages. We are currently working on a PrettyPrinter. Some things you might want to make note of before you copy and paste your code into an edit window:

Please help us to set these standards by voicing your opinions in CodingConventions and CodingStyle. -- MichaelFried

/*
 * @(#)Example.java 1.1 1997.11.30
 *
 * This software forms part of the distribution of the JOS
 * operating system (see http://www.jos.org/) and is
 * subject to the license conditions currently in force.
 *
 * Briefly, these will permit you to:
 * 1. Use the software without any (including implied) warranty,
 * 2. Redistribute the software with the same license,
 * 3. Modify the software including the existing author list,
 * 4. Sell the software with the same license.
 */

package org.jos;

/**
 * This class exists to give an example of good style for source code.
 *
 * @version	  1.1
 * @author		Michael Fried
 * @author		Tony Austin
 */

// Real tabs work in Wiki/html.

public class Example
{
	public static void main(String args[])
	{
		System.out.println("This is an example class.");
		// Analogous to the "hello world" which we all wrote years ago
	}

	public Example()
	{
	}
}

Please feel free to modify the above section. If you do, be sure to sign the file in the authors section.




Content of these pages are owned and copyrighted by the poster.
Hosted by: