Results 1 to 3 of 3

Thread: Java .class file

  1. #1
    Join Date
    Jul 2009
    Posts
    188

    Java .class file

    Hi,
    I have recently started learning java. It sounds a very good language. I am eager to learn this java. So, what does a .class file means in java. I now this is a silly questions, but I want to make my base perfect. Can any one explain me what the .class file is and what is the use of .class in java. Thanks

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Java .class file

    Java JVM needs to know about one java class or interface, the .class file contains this information. The major components of a class file are version, super class, interfaces, methods etc. The length of the class file can't be predicted, it often varies. the information in the class file is written with no space and no padding between pieces of information. This helps keep class file small so that they can fly across networks.

  3. #3
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Java .class file

    The above information is perfect. I would like to add some more information to it. The components of the class file are strictly defined, so the JVM knows where to expect it and what to except. An example is, every JVM knows that the first eight bytes of a class file are the version number and magic and that the pool starts at the 9th byte. After it has finished reading the pool, it knows the next two bytes will be access flags. Don't worry it's not the difficult to understand once you get started.

Similar Threads

  1. Converting java class to java bean class
    By Ucchal in forum Software Development
    Replies: 6
    Last Post: 09-08-2010, 10:24 AM
  2. Dimension class of java
    By Gokul20 in forum Software Development
    Replies: 5
    Last Post: 25-02-2010, 08:02 AM
  3. JSplitPane class of java
    By Owen Fernandes in forum Software Development
    Replies: 5
    Last Post: 15-02-2010, 08:44 AM
  4. What does Legacy Class mean in java?
    By CAILYN in forum Software Development
    Replies: 5
    Last Post: 01-02-2010, 08:29 AM
  5. Java Programming Language Basics: Reflection Basics and Class Class
    By mayuri_gunjan in forum Guides & Tutorials
    Replies: 6
    Last Post: 29-08-2005, 12:04 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,546,374.66902 seconds with 16 queries