Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

java.util.zip.ZipException

807588Apr 3 2009 — edited Apr 22 2009
Hi,

I am getting following Exception while unzipping the .zip file from a software:

java.util.zip.ZipException: invalid END header (bad central directory offset)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:203)
at java.util.zip.ZipFile.<init>(ZipFile.java:234)

Software unzip some of the files and and gives the below exception on some files .... any Ideas ?


rizzz86,

Comments

807601
Not until you learn how to spell please. This is not a text message on your mobile.
807601
A Static method can be called with the class name with out creating an object,
Ex. <className>.<methodName>();
where as the non static method must be called by using an object, an object is an instance of a class.
Ex. <objName>.<methodName>();
807601
Angelina123 wrote:
Hi there,
I am new to java.Plz tell me the difference between static and dynamic methods.
Do you mean the difference between methods that are declared static and those that are not? The former are also sometimes called class methods and the latter instance methods.

When a method (or variable) is declared static it belongs to the whole class. If it's not declared static it belongs to each object (instance) of the class. When you call a static method you prefix the name with the class name. When you call an instance method you prefix the name with an object reference.

Most of your methods will be instance methods. Static methods are used for thing that concerns the whole class. One example is that it could keep track of how many objects that has been created. Another example is that it could be used to create objects of the class (a so called object factory).
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 20 2009
Added on Apr 3 2009
3 comments
3,274 views