Code Samples
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.
Categories in Code Samples
- 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
- Funny sms
- birthday messages
- Cross-Platform Technologies
Java Platform, Standard Edition (Java SE)
- Language Syntax
- Numbers and Math Operations
- Life Cycle of An Object
- Reading and Writing Data
- Classes and Inheritance
- Reflection
- Community
- Threaded Programs
- Swing and GUI Programming
- Multi-Media
- Error Handling
- Internationalization
Java Platform, Enterprise Edition, (Java EE)
- Specific Java EE Technologies
- Auction Application Code Samples from Advanced Programming for the Java 2 Platform.
- Java BluePrints.
- Java EE Connector Architecture
- Web Services
JavaFX Platform
Java Platform, Micro Edition, (Java ME)
- Code Samples from the Mobility Developer web site.
MIDP/CLDC
- You can download MIDP code samples from the Java series book Programming Wireless Devices with the Java 2 Platform, Micro Edition.
- MIDP code samples from the Wireless Developer web site.
Java Card - Smart Card Technology
- Code Samples from the Java series book Java Card Technology for smart cards.
Database Technologies
The following code samples are used for databases, such as MySQL, and technologies such as JDBC connectivity.
Scripting Languages
Cross-Platform Technologies
- 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.
- Social Community: Browse for news and questions, other moment you get the answer of your reviews.
- NetBeans Sample Catalog: Browse the NetBeans Sample Catalog for a comprehensive collection of sample applications spanning the latest enterprise, web, mobile, and scripting technologies.
- Birthday Quotes: Browse for free birthday quotes and get a large collection of birthday quotes on allbestmessages.com
- Konferens Stockholm: Konferens Stockholm, Konferens i Stockholm City, Konferens Stockholm - Boka Konferens, Boka Konferens Stockholm
Comments (58)
Oct 17, 2008
shawon says:
how i can take thishow i can take this
Mar 10, 2009
wzq says:
Sorry,what is it?Sorry,what is it?
Oct 30
Lafra6 says:
It is a wiki website Watch Movies OnlineIt is a wiki website
Watch Movies Online
Nov 01
dunlopm says:
This is like a one stop service for those who wants a chunk of sample Java codes...This is like a one stop service for those who wants a chunk of sample Java codes. It's very informative and really useful.
promote websites
Nov 04
CustomT-shirts says:
Perfect wiki since I'm a software engineering student current. Depth of this wik...Perfect wiki since I'm a software engineering student current. Depth of this wiki is great so far for referencing. design your own t-shirt
Oct 23
Julia33 says:
It is too hard can you explain it? designer sunglassesIt is too hard can you explain it?
designer sunglasses
Oct 27
John665 says:
It is very informative website thak you so much for sharing GamesGamesIt is very informative website thak you so much for sharing
GamesGames
yesterday at 02:51 PM
john20001 says:
please,send me the text box sample code! backlinks webmarketing tipsbacklinksplease,send me the text box sample code! backlinks webmarketing tipsbacklinks
Oct 30
Lafra6 says:
Please give me details i did not understand anything. Web OptimizationPlease give me details i did not understand anything.
Web Optimization
Nov 08
vujohn says:
Sun is going to become a king in Java world. I like java coding but its much tou...Sun is going to become a king in Java world. I like java coding but its much tough to me.
Konferens Stockholm
about 12 hours ago
vujohn says:
i love to code java programming, thanks for the sample coding. Konferens Uppsalai love to code java programming, thanks for the sample coding.
Konferens Uppsala
about 10 hours ago
FARhussain1 says:
I think struts are use for mobile Com. Netbeans new version ? Football KitsI think struts are use for mobile Com. Netbeans new version ?
Football Kits
about 7 hours ago
brian5855 says:
ExcellentExcellent
about 7 hours ago
brian5855 says:
This page has helped me out quite a bit. Thanks white nightstands memory foam ma...This page has helped me out quite a bit. Thanks white nightstands memory foam mattress pad
Jan 22, 2009
Bhagyalakshmi says:
Shall I obtain sample codings for cache access employed in proxyShall I obtain sample codings for cache access employed in proxy
Oct 23
Julia33 says:
I dont think we can obtain it from proxy. Fast Blog Content Pros QuoteI dont think we can obtain it from proxy.
Fast Blog Content
Pros Quote
Mar 23, 2009
sangili says:
please,send me the text box sample codeplease,send me the text box sample code
Oct 23
Julia33 says:
I also need the text box code please email me. Cheap Web HostingI also need the text box code please email me.
Cheap Web Hosting
Nov 08
bigfarmertan says:
It is pretty easy stuff actually Non Chexsystems Banks Latex MattressIt is pretty easy stuff actually
Non Chexsystems Banks
Latex Mattress
Apr 19, 2009
jupiter_123 says:
urgently want solution (source code) to the problem of uploading excel files int...urgently want solution (source code) to the problem of uploading excel files into oracle database developed using java / j2ee.
please mail the source code to raichallp@yahoo.co.in
Thanks & Regards
Jupiter
Jun 04
scotsles says:
look herelook here
Oct 23
Julia33 says:
I need this code please help me Postcard PrintingI need this code please help me Postcard Printing
Oct 23
Julia33 says:
i need the solution urgently.Football Kitsi need the solution urgently.Football Kits
Oct 23
vova112233 says:
Please let me know how we can get this code. Thank you. Web Design New YorkPlease let me know how we can get this code.
Thank you.
Web Design New York
Oct 24
hqprints1 says:
Are there any CORBA code samples available? Thanks Online Bachelor Degree Hooked...Are there any CORBA code samples available?
Thanks
Online Bachelor Degree
Hooked On Phonics
Oct 26
Sarafoster212 says:
I think struts are use for mobile Com. Netbeans new version ? Degree OnlineI think struts are use for mobile Com. Netbeans new version ?
Degree Online
Oct 27
accordd says:
I want to use your sample code for developing online database of orders, suppli...I want to use your sample code for developing online database of orders, suppliers to the huge base (seyschas database in dbf). What technology do I as a beginner is better to use?
Russian Girls|Oriflame|Russian Date
Oct 27
marinefish says:
great post, how can I implement this code? war gamesgreat post, how can I implement this code?
war games
Oct 27
robertmar says:
How can i get the the text box sample code? is there any place that i can downlo...How can i get the the text box sample code? is there any place that i can download it?
car games
car games
Oct 27
sarabat says:
Maybe i can ger some help here, how can i uploading excel files into oracle data...Maybe i can ger some help here, how can i uploading excel files into oracle database developed using java?
Mahjong Tetris
Oct 27
Farrishussain1 says:
It was very helpful post thank you so much for sharing. Zhu Zhu PetsIt was very helpful post thank you so much for sharing.
Zhu Zhu Pets
Oct 28
royalt says:
Sounds interesting, but as someone asked before i would like, which technology d...Sounds interesting, but as someone asked before i would like, which technology do I use as a beginner, it really interests me.
Thanks for the post.
play game Hannah Montana games spiderman games
Oct 28
Lola456 says:
Very helful info thank you so much for sharing Tax ReliefTax ReliefVery helful info thank you so much for sharing Tax ReliefTax Relief
Oct 28
Mikejohn says:
coding is very useful in IT business free create domaincoding is very useful in IT business free create domain
Oct 30
brianssss says:
These code samples come in very handy, mind if i use them for educational purpos...These code samples come in very handy, mind if i use them for educational purposes?
top 10 supplements
Oct 30
Lafra6 says:
Naruto ShippudenNaruto ShippudenNaruto ShippudenNaruto Shippuden
Oct 30
Free-Guide says:
I love Java is one of the best programming language, i use it a lot with xml and...I love Java is one of the best programming language, i use it a lot with xml and there is nothing better than it
i will work on my new php Serie A site and make it a great site
I want to mix java and xml, so i can easily import my italian soccer highlights using xml
I will also add all the guide on my free guide site. Java the best
Nov 02
vujohn says:
JAVA is really a hug language and skill to learn, i love java programming, these...JAVA is really a hug language and skill to learn, i love java programming, these sample codes are increasing my awareness to java coding, Thanks to Java
Urdu Poetry Wallpapers
Nov 02
Footy123 says:
JAVA is a great language and has helped me, a lot in the past. These code sample...JAVA is a great language and has helped me, a lot in the past. These code samples are very helpful
premiership sport
Nov 03
seanyboyyo says:
Java is such a great language, and these codes were really helpful to me! Thank...Java is such a great language, and these codes were really helpful to me!
Thanks wikis.sun!
Cheap Directory Submissions.com
Nov 03
zayiflatici-korse says:
JAVA is really a hug language and skill to learn, i love java programming, these...JAVA is really a hug language and skill to learn, i love java programming, these sample codes are increasing my awareness to java coding, Thanks to Java
korse
Nov 03
bigfarmertan says:
I love using Java. I am currently getting a certificate for Java Second Chance C...I love using Java. I am currently getting a certificate for Java
Second Chance Checking
It is a great list of Code Samples
Second Chance Checking Account
Nov 03
getmeexback says:
Is there a snippet of code that will allow code that runs in one JRE (Java Runti...Is there a snippet of code that will allow code that runs in one JRE (Java Runtime Environment) version to run in other new versions also? If so please post it here.
Get me ex back
Nov 03
javamal says:
I would suggest adding the Jython Project to the list of useful links on this pa...I would suggest adding the Jython Project to the list of useful links on this page. Being a newbie I am not totally sure the community would want it but it's 100% java based and it makes beans easily accessible. Cheers - Mal NJ web design
Nov 04
andrewblogadino says:
The section with the database technologies saved me a ton of time. Thank you for...The section with the database technologies saved me a ton of time. Thank you for providing all of these great code samples in one place . Thanks.
Nov 08
web-directory says:
I'm developing a Java clock for my web directory and I'm having some issues with...I'm developing a Java clock for my web directory and I'm having some issues with getting the syntax right. That's why I came here and I'm studying some of the sample codes I saw here, to know if they shed some light on what I want to achieve. I just can't step away from Java to Javascript or PHP clock, which would be pretty much easier for me to code. Java clock has a sweet digital interface and great functionality, which I like so much, and prefer it to other scripting languages.
If these codes here don't help, I will go over to the forum and try to get help. I hope coders over there will be helpful and give a helping hand to a new coder.
Nov 05
mesotheliomacancer says:
im trying to use some of these java codes on my websites: Mesothelioma Doctors a...im trying to use some of these java codes on my websites: Mesothelioma Doctors and Asbestos and Mesothelioma.
I had a hard time using the scripting languages. Is there a chance that something might not be working properly in the code? I'm still fairly new to this so I can't tell.
Can someone take a look at the scripting language coding samples?
please advise me,
Ryan
Nov 05
subzero27 says:
I have used java card for programming a atmel flash chip.My problem is that the ...I have used java card for programming a atmel flash chip.My problem is that the read /write buffers are showing parity errors and i am cluesless about it.
Any help....
Thanks
Joe
ontslag op staande voet
Nov 05
presleywaters says:
what would happen if the include library files are specified in another library ...what would happen if the include library files are specified in another library that i would need to extend in the files?
modern furniture blog
platform bed
modern furniture
Nov 05
activated says:
If you guys don't have any experience with Java you need to start smaller. Try s...If you guys don't have any experience with Java you need to start smaller. Try starting with C++ it's much easier to code with as a beginner. If you really want to learn Java then take a class at your local community college. I know the economy is bad so cash might be tight for you. If that's the case you can try a cash advance service or just try to borrow money from a friend.
Nov 06
Sun_addict says:
Java is a so powerful language, I just love it! Lukaz jeux de mario - jeux de m...Java is a so powerful language, I just love it!
Lukaz
jeux de mario - jeux de moto
Nov 06
Timus says:
Good point when starting Java programming is the object model. Variables have a ...Good point when starting Java programming is the object model.
Variables have a type and it decreases error margins, much more than on PHP.
After trying both, I must say I generally use PHP for web development because it is available on more servers, and JAVA each time I have to make an app so that it's always cross-platform!
Timus
Poker gratuit
Nov 06
buckyuk says:
Where can we get access to this code pleeeease?? Thanks alot. John yournetbizWhere can we get access to this code pleeeease??
Thanks alot.
John
yournetbiz
Nov 06
referencement says:
After defining what Java is, the next logical step is to determine why you might...After defining what Java is, the next logical step is to determine why you might use it, or more specifically, under what circumstances you might want to use it. It’s no secret that I love the Java programming language, but I’m also rational enough to understand that one needs to use the best tool for the job, whether that tool is Java or not. So this section will help you understand for what jobs Java is the best tool.
Referencement poker
Nov 07
Lappy_Happy1 says:
it was very nice page thanks Presentation SkillsPresentation Skillsit was very nice page thanks
Presentation SkillsPresentation Skills
Nov 08
PHP-SOFTWARE says:
As a PHP software developer, I like the PHP code snippets you have collected her...As a PHP software developer, I like the PHP code snippets you have collected here. I'm creating a PHP image gallery script and an article software, and sometimes I find making certain code tweaks challenging. The sample codes I find here have been very helpful.
yesterday at 06:08 AM
Sarafoster212 says:
Netbeans is used for J2ME , J2SE apps. This software is related to mobile apps s...Netbeans is used for J2ME , J2SE apps. This software is related to mobile apps same like that.
younrnetbiz
yesterday at 03:48 PM
gatot_koco says:
A lot of documentation and programs we have develop using Java applications, mor...A lot of documentation and programs we have develop using Java applications, more codes should be publicly available on the net so people can learn easier about the software.
apotik online