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 Can anyone explain this program briefly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Can anyone explain this program briefly " Watch "Can anyone explain this program briefly " New topic
Author

Can anyone explain this program briefly

sunil langeh
Ranch Hand

Joined: Sep 04, 2007
Posts: 88


I have also a doubt in Line 1 about for loop syntax, Can be use both conditional and increment/decrement operator together??


Thanks
Sunil (SCJP 5)
sunil langeh
Ranch Hand

Joined: Sep 04, 2007
Posts: 88
sunil langeh wrote:

I have also a doubt in Line 1 about for loop syntax, Can be use both conditional and increment/decrement operator together??


Sorry,,Got it from k&B Book
Prav sharma
Ranch Hand

Joined: Feb 07, 2005
Posts: 102
sunil langeh wrote:

I have also a doubt in Line 1 about for loop syntax, Can be use both conditional and increment/decrement operator together??


Its an example of valid syntax.
Sachin Adat
Ranch Hand

Joined: Sep 03, 2007
Posts: 213
Yes you can!!!

Any other doubt?


SCJP 6
How To Ask Questions On Java Ranch - How To Answer Questions On Java Ranch
sunil langeh
Ranch Hand

Joined: Sep 04, 2007
Posts: 88
Sachin Adat wrote:Yes you can!!!

Can be use both conditional and increment/decrement operator together??
sunil langeh
Ranch Hand

Joined: Sep 04, 2007
Posts: 88
Thanks Sachin
sunil langeh
Ranch Hand

Joined: Sep 04, 2007
Posts: 88
sunil langeh wrote:Thanks Sachin

Sachin one more thing, What will be the flow of for loo if we use both operators together,,Compiler firstly looks on condition or on increment/decrement?
Sachin Adat
Ranch Hand

Joined: Sep 03, 2007
Posts: 213
sunil langeh wrote:Compiler firstly looks on condition or on increment/decrement?

Depends if it is post or pre. In this case its pre-increment, so it will first increment then check the condition.
sunil langeh
Ranch Hand

Joined: Sep 04, 2007
Posts: 88
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can anyone explain this program briefly
 
Similar Threads
Doubt with Kathy sierra chapter 10
scjp chapter 10 self test doubt
ch10 q2
KB 791
Compiling errata for K&B, SCJP 6