aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Question on placement of ; 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 "Question on placement of ;" Watch "Question on placement of ;" New topic
Author

Question on placement of ;

Ashish Anant Patil
Greenhorn

Joined: Mar 17, 2013
Posts: 7
what does " ;" in middle of program or loop mean?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14435
    
  23

It's an empty statement, and does nothing.

Can you give a specific code example?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Ashish Anant Patil
Greenhorn

Joined: Mar 17, 2013
Posts: 7
for(int i=1;i<4;i++)
;
//more code...
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14435
    
  23

That's a loop that lets i increment from 1 to 3, but does nothing in each iteration of the loop. Nobody would write something like that in real code, if they know what they are doing.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on placement of ;