Suppose I have:

```
Class A{
   int a;
}

A obj = new A();

```

Then what will be size of obj? Will it be of same size as int size, like in C?

If I can figure out this, then I can keep large HashMap in RAM without using database.

Thanks in advance.

**EDIT**

Friends,

Actually I have:

```
HashMap<Long, List<T>> map;

```

and 

```
class T{
   private int a;
   private int b;
   private int c;
   // constructor, getters and setters
}

```

And size of map may grow to have 10000000 keys and for each key I will have list of size 100-1000.

Will this whole map stay in heap?

**EDIT 2**

When I loaded map with around 70000 keys, and when I serialized it to file, file was of around 18 MB, so will my map be of 18 MB in heap?