Posts

Showing posts from April, 2008

Creating a State Diagram

A State diagram is a visual representation of an application's state machines. It shows the life of an object from birth to death. In this type of diagram, you see the behavior specifying the sequence of states that the object goes through in response to events over its lifetime, and you see the object's responses to those events. You can use a State diagram when you are working on a real-time process-control application or a subsystem that involves concurrent processing, or when you want to express the behavior of a class over several use cases. 1. Create a UML Project and add a State diagram 1. Choose File New Project. 2. In the New Project wizard: 1. Select Categories UML. 2. Select Projects Platform-Independent Model. 3. Click Next. 3. In the New Platform-Independent Model panel: 1. Type a name for the UML project, such as MyUMLProject. 2. Choose a directory where the project will be stored. 4.

NetBeans IDE Keyboard Shortcuts

Ctrl-Space Code completion Esc Close code completion Shift-Space Enter a space without expanding an abbreviation Alt-F1 Display Javadoc Shift-F1 Search Javadoc Alt-Shift-I Import class Alt-U, G Append get to identifier Alt-U, S Append set to identifier Alt-U, I Append is to identifier Ctrl-Shift-F Reformat selection Ctrl-T Shift one tab to the right Ctrl-D Shift one tab to the left Ctrl-Shift-T Comment out with line comments ("//") Ctrl-Shift-D Remove line comments ("//") Ctrl-W Delete current or previous word Ctrl-E Remove the current line Ctrl-J, S Start recording macro Ctrl-J, E Stop macro recording Ctrl-[ Move insertion point to matching bracket Ctrl-L Word match - forward Ctrl-K Word match - back Ctrl-F Find Ctrl-H Replace F3 Find next Shift-

Java 1.5 Language Features

Generics This long-awaited enhancement to the type system allows a type or method to operate on objects of various types while providing compile-time type safety. It adds compile-time type safety to the Collections Framework and eliminates the drudgery of casting. Enhanced for Loop This new language construct eliminates the drudgery and error-proneness of iterators and index variables when iterating over collections and arrays. Autoboxing/Unboxing This facility eliminates the drudgery of manual conversion between primitive types (such as int) and wrapper types (such as Integer). Typesafe Enums This flexible object-oriented enumerated type facility allows you to create enumerated types with arbitrary methods and fields. It provides all the benefits of the Typesafe Enum pattern ("Effective Java," Item 21) without the verbosity and the error-proneness. Varargs This facility eliminates the need for manually boxing up argument lists into an array when invoking me