Friday, 20 November 2015

Java Tutorial : Java enhanced for loop


Click here to watch in Youtube :
https://www.youtube.com/watch?v=KoySBcqpDbo&list=UUhwKlOVR041tngjerWxVccw

EnhancedForDemo.java
class EnhancedForDemo
{
    public static void main(String[] args)
    {

        String[] strArray =
        { "Apple", "Ball", "Cat", "Dog" };

        /*
         * Using foreach loop getting each element
         * from strArray.
         */
        for (String element : strArray)
        {
            System.out.println(element);
        }
    }
}
Output
Apple
Ball
Cat
Dog
Click the below link to download the code:
https://sites.google.com/site/javaee4321/java/ControlFlowDemoEnhanceForloopApp.zip?attredirects=0&d=1

Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/ControlFlowDemoEnhanceForloopApp

Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/9f2088c41ff235b2716289e24cabde9d7d07fb91/BasicJava/ControlFlowDemoEnhanceForloopApp/?at=master

See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • No comments:

    Post a Comment