Code Samples is a collection of code snippets exemplifying the Java programming language and other languages. Example code comes from various published documents on java.sun.com, and are also provided by the developer community. Use Code Samples for your own programming, and add your own examples to this collection.
Before adding code to this wiki, see the About Code Samples page for more information about this Code Samples wiki, how to add to it, and some general guidelines to follow.
- Java Platform, Standard Edition (Java SE)
- Java Platform, Enterprise Edition, (Java EE)
- JavaFX Platform
- Java Platform, Micro Edition, (Java ME)
- Java Card - Smart Card Technology
- Database Technologies
- Scripting Languages
- Cross-Platform Technologies
- Language Syntax
- Numbers and Math Operations
- Life Cycle of An Object
- Reading and Writing Data
- Classes and Inheritance
- Threaded Programs
- Swing and GUI Programming
- Error Handling
- Specific Java EE Technologies
- Auction Application Code Samples from Advanced Programming for the Java 2 Platform.
- Java BluePrints.
- Java EE Connector Architecture
- JEE6 JPA 2.0 EclipseLink RI examples by EE container
- Web Services
- You can download MIDP code samples from the Java series book Programming Wireless Devices with the Java 2 Platform, Micro Edition.
The following code samples are used for databases, such as MySQL, and technologies such as JDBC connectivity.
- Internationalization: Designing an application so it can be adapted to various languages and regions without engineering changes. Localization is the process of adapting software for a specific region or language by adding locale-specific components and translating text.
- Java BluePrints: Illustrating design patterns and best practices for Java platform-based end-to-end (client-server) solutions.
- Security: Signing and verifying signed data, encrypting and decrypting data, and writing a security manager. A security manager is a Java virtual machine (JVM 1) object that implements a security policy such as prompting an end user for password verification.
- NetBeans Sample Catalog: Browse the NetBeans Sample Catalog for a comprehensive collection of sample applications spanning the latest enterprise, web, mobile, and scripting technologies.