File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Enhanced for loop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Enhanced for loop" Watch "Enhanced for loop" New topic
Author

Enhanced for loop

Juwonlo Ibigbami
Ranch Hand

Joined: Nov 03, 2006
Posts: 83
Hi in the house, please can eny body explain to me how to used enhanced for loop to asign value to an array of array at runtime using scanner

Juwonlo(scjp prep.)
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14146
    
  18

Can you post some code to explain your question more clearly? What have you tried yourself, and where do you get stuck exactly?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Juwonlo Ibigbami
Ranch Hand

Joined: Nov 03, 2006
Posts: 83
Thanks,Explainingmyselfbetter,
Given:
int[][] a =new A[5][]
How can i use the enhanced for loop to assing values to the arrays inside array decleared above.
Omer Haderi
Ranch Hand

Joined: Sep 27, 2006
Posts: 42
Aloha...

There is no such thing in java int[][] a =new A[5][]...

If you mean int [][]a = new int[4][]; then you can use it like this in the enhanced loop:


PS: is it difficult to separate the words when asking questions ?

cheers!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Enhanced for loop