Profile
Achievement
rnavanee's Recent Snippets
- All /
« Prev 1 Next »
Externalizable interface provides you an alternate to Serializable interface. In Externalizable, you specify how/what to persist.
Seralizable persists all non-transient elements using default serialize/deserialize implementation.
0
939
posted 11 years ago by rnavanee
This java code, when executed, throws OOM error.
Java Console:
...
Exception in thread "main" java.lang.OutOfMemoryError
...
Heapdump Data:
...
1STHEAPFREE Bytes of Heap Space Free: 0
1STHEAPALLOC Bytes of Heap Space Allocated: 666...
0
987
posted 11 years ago by rnavanee
Determine the minimum number of coins for change
Given any number between 1 and 99, determine how to give change with the minimum number of coins. You can assume that the coins are 1c, 2c, 5c, 10c, 20c and 50c.
1
913
posted 11 years ago by rnavanee
Calculate The Second Highest Frequency
Write a method that accepts a String and returns the character with the second highest frequency. For example "aabbbc" would return 'a'. If the string contains spaces, they can be disregarded from the count.
1
871
posted 11 years ago by rnavanee