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:
before yourafter it to format it in a fixed width font.java codeand
,will lose their formatting values. This is an odd property of Wiki, so please try to reformat the above html, so it looks the same if you modify it.
/* * @(#)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() { } }