File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Beginning Java
Author
why dsnt it works
satwant singh
Greenhorn
Joined: Dec 02, 2008
Posts: 6
posted
Dec 15, 2008 23:50:00
0
i have made an enhaced for loop that is foreach type loop in
java
i.e/ like
int arr[]={1,2,3,4};
for(int x:arr)
System.out.println(x);
it works properly in my office pc having configuration
ASUS-945 mb
1 gb ram
160 gb hdd
windows xp prof
but
not at my home having same configuration
there occured errors like
must use ; in plce of :
help me
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
11
I like...
posted
Dec 15, 2008 23:54:00
0
not at my home having same configuration
Are you using Java5 at home ? Try to type "java -version" at the command line.
[My Blog]
All roads lead to JavaRanch
Nitin Pathak
Ranch Hand
Joined: Sep 25, 2006
Posts: 68
posted
Dec 16, 2008 04:43:00
0
The new syntax of array iteration mentioned below has been introduced as part of J2SE 5.0.
for (FormalParameter : Expression) Statement
Try upgrading your PC Java version to 5 (as rightly pointed out by Christophe) and you should be all set with the minimal hardware configuration.
I agree. Here's the link:
http://aspose.com/file-tools
subject: why dsnt it works
Similar Threads
Problem in WPS 5.1 Test Environment Startup
Which monitor an application is running on
laptop needed
Laptop: which brand to choose?
pre and postfix operator in for loop
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter