Profile
Achievement
rnavanee's Recent SnippetsTagged java
- 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
944
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
991
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
915
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
879
posted 11 years ago by rnavanee