Results 1 to 3 of 3
  1. #1
    gauravmanral's Avatar
    gauravmanral is offline Gaurav Manral
    Join Date
    Jul 2011
    Location
    Delhi
    Posts
    37
    Rep Power
    0

    Question HOW MUCH SPACE is ALLOCATED TO A METHOD

    Java Code:
    class arithmatic
    {
    int x,y,z;
    int add (int x,int y)
    {
    return(x+y);
    }
    }
    please tell me how much space will be allocated to this method...???
    Last edited by JosAH; 07-10-2011 at 09:44 AM.

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,524
    Blog Entries
    7
    Rep Power
    20

    Default

    I fixed your font size and added code tags ... read the specification of the JVM for its programming model (instruction set). Your method and class take up only a few bytes. Also read the manual for the javap utility (it can disassemble a class file).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    gauravmanral's Avatar
    gauravmanral is offline Gaurav Manral
    Join Date
    Jul 2011
    Location
    Delhi
    Posts
    37
    Rep Power
    0

    Default

    it doesn't seem to help me at all.
    i don't find any useful information about my question till now.

    i have the installed sdk 5 in my system. please tell me how much space will be allocated???

Similar Threads

  1. get maximum heap size that can be allocated
    By gautam.aditya97 in forum Java 2D
    Replies: 3
    Last Post: 04-05-2010, 05:03 AM
  2. Space Invaders help!
    By Midge in forum New To Java
    Replies: 5
    Last Post: 03-04-2010, 04:38 PM
  3. add a space after 10 lines?
    By ukemasta in forum New To Java
    Replies: 10
    Last Post: 01-20-2010, 12:12 PM
  4. Replies: 0
    Last Post: 07-05-2009, 12:31 PM
  5. Replies: 2
    Last Post: 08-21-2008, 07:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •