File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Getting error in this code??? why is that so? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Getting error in this code??? why is that so?" Watch "Getting error in this code??? why is that so?" New topic
Author

Getting error in this code??? why is that so?

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055



http://www.lifesbizzare.blogspot.com || OCJP:81%
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14268
    
  21

Are we supposed to guess what the error is? Please TellTheDetails.

Looking at your code , line 7 is invalid. You can't put arbitrary statements at class level, only variable declarations with an optional initialization value.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Pratik D mehta
Ranch Hand

Joined: Jul 29, 2010
Posts: 121


I think you wan to do this


Understanding is Everything - Peter Lord
 
Consider Paul's rocket mass heater.
 
subject: Getting error in this code??? why is that so?