Τετάρτη 17 Σεπτεμβρίου 2008

Java comments for javadoc how to

Java comments for javadoc how to

In Netbeans, write /** before a constructor for example and press enter. It will automatically generate the javadoc comments for that constructor!


/**
* Returns an Image object that can then be painted on the screen.
* The url argument must specify an absolute {@link URL}. The name
* argument is a specifier that is relative to the url argument.
*


* This method always returns immediately, whether or not the
* image exists. When this applet attempts to draw the image on
* the screen, the data will be loaded. The graphics primitives
* that draw the image will incrementally paint on the screen.
*
* @param url an absolute URL giving the base location of the image
* @param name the location of the image, relative to the url argument
* @return the image at the specified URL
* @see Image
*/
public Image getImage(URL url, String name) {
try {
return getImage(new URL(url, name));
} catch (MalformedURLException e) {
return null;
}
}



http://java.sun.com/j2se/javadoc/writingdoccomments/

Πέμπτη 4 Σεπτεμβρίου 2008

J2me sockets and streams...

http://www.russellbeattie.com/notebook/1002646.html

a call to Connector.open("sockets://...") in the main thread will STOP your application from running without an error.

if the inputStream is blocked waiting for a read(), then the outputStream is blocked also.

a call to InputStream.available() always returns 0, regardless of how many bytes are actually available.

Τρίτη 2 Σεπτεμβρίου 2008

Java Naming Conventions

Java Naming Conventions

http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html

http://geosoft.no/development/javastyle.html