Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Enhance looping in Java 5.0 with for/in

The for/in loop -- often called either enhanced for or foreach is largely a convenience feature in Java 5.0. It doesn\\'t really offer any new functionality, but certainly makes several routine coding tasks simpler.

Tutorial Details:

In this article, you\'ll learn about many of those, including using for/in to iterator over arrays and collections, as well as how it can help avoid unnecessary (or just plain annoying) typecasts. You\'ll also learn how for/in is implemented, glean details about the new Iterable interface, and even understand how to make your own custom objects usable with this new construct. Finally, you\'ll learn about the things that for/in can\'t do to make sure you understand when plain old for is the right choice.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Enhance looping in Java 5.0 with for/in

View Tutorial:
Enhance looping in Java 5.0 with for/in

Related Tutorials:

YourKit Java Profiler 2.5.2 Released
YourKit Java Profiler 3.2 Released With help of YourKit Java Profiler, an outstanding tool for Java professionals, you can easily solve wide range of CPU and memory related performance problems in J2EE and J2SE applications.
 
Annotations in Tiger, Part 2: Custom annotations
Write your own annotations in Java 5 Part 1 of this series introduced annotations, the new metadata facility in J2SE 5.0, and focused on Tiger's basic built-in annotations. A more powerful related feature is support for writing your own annotations. In t
 
Monitoring Local and Remote Applications Using JMX 1.2 and JConsole
Monitoring Local and Remote Applications Using JMX 1.2 and JConsole The latest release of Java, J2SE 5.0 (codenamed Tiger), adds core support for the Java Management Extensions (JMX) 1.2 into the Java standard libraries. This article walks you through h
 
Bridging the Gap: J2SE 5.0 Annotations
Bridging the Gap: J2SE 5.0 Annotations It takes a long time for the Java community to fully absorb a major new JDK release; it seems to take about two more releases after a brand new version of the JDK before everything settles down. Application server v
 
The JDBC RowSet Implementations Tutorial
In "The JDBC RowSet Implementations Tutorial," you will look at how to use the standard JDBC RowSet implementations specified in JSR-114.
 
Create and Read J2SE 5.0 Annotations with the ASM Bytecode Toolkit
Create and Read J2SE 5.0 Annotations with the ASM Bytecode Toolkit Bytecode Attributes Annotations are actually stored in bytecode with several special attributes. The binary format for these and all other standard attributes is described in the Java Vi
 
YourKit Java Profiler 3.2 Released
With help of YourKit Java Profiler, an outstanding tool for Java professionals, you can easily solve wide range of CPU and memory related performance problems in J2EE and J2SE applications.
 
Concurrency in JDK 5.0
Concurrency in JDK 5.0 JDK 5.0 added major new support for developing concurrent applications, including JVM changes, new low-level synchronization utilities, and higher-level, thread-safe, high-performance concurrency classes such as thread pools, concu
 
Enhance looping in Java 5.0 with for/in
The for/in loop -- often called either enhanced for or foreach is largely a convenience feature in Java 5.0. It doesn\\'t really offer any new functionality, but certainly makes several routine coding tasks simpler.
 
The Introduction to generic types in JDK 5.0
This tutorial introduces generic types, a new feature in JDK 5.0 that lets you define classes with abstract type parameters that you specify at instantiation time. Generics increase the type safety and maintainability of large programs. Follow along with
 
JDBC RowSet Implementations Tutorial (PDF)
This tutorial explains how to use the standard JDBC RowSet implementations that are provided as part of J2SE 5.0. Get up to speed with each RowSet definition and benefit from improved scalability and robustness.
 
What's New in Swing?
A new skinnable look and feel (Synth), printing support for |JTable| components, the ability to add components directly to a frame, these are a few of the new features in Swing for J2SE 5.0.
 
Using JConsole to Monitor Applications
JConsole is the Java Monitoring and Management Console, a new graphical tool shipped in J2SE JDK 5.0. This article describes how JConsole can be used to observe information about an application running on the Java platform, with an overview of the J2SE 5.
 
Tiger and Beyond, the Future of the Java Platform
Part Two of an interview with Sun Microsystems' Sun Fellow, Graham Hamilton, explores Java 2 Platform, Standard Edition 5.0 (J2SE 5.0) and the future of the Java language.
 
HPROF: A Heap/CPU Profiling Tool in J2SE 5.0
Having performance problems with your Java Application? Using too much Java heap space and don't know why? Sometimes simple software tools are all that's needed.
 
Chat Transcript: New Language Features in J2SE 5.0
Java 2 Platform, Standard Edition (J2SE) 5.0. includes the biggest set of language changes since the original release of the Java programming language.
 
Using and Programming Generics in J2SE 5.0
Generics, one of the most frequently requested language extensions to the Java programming language, have been added in J2SE 5.0. This article provides an introduction to programming with generics.
 
Five Reasons to Move to the J2SE 5 Platform
Five important reasons to move to the Java 2 Platform, Standard Edition (J2SE platform) 5.0, supported by data and references to prove that the 5.0 release will reduce development and runtime costs.
 
Tech Tip: Using the Varargs Language Feature
Have you ever needed to pass in many instances of the same object type to a method, but you don't know at compile time how many instances there will be? Find out how the new varargs language feature makes it easy to handle situations like this.
 
J2SE Platform Migration Guide (pdf)
This guide helps developers migrate Java applets, standalone applications, Java Web Start applications and development tools from version 1.3 and 1.4 of the Java platform to version 5.0.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.