"Classes are represented in memory as areas where code and class shared objects are. The JVM use class loader to load classes and unload them if no more required at runtime as specified at https://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html#jls-12.7, to name a very consolidated version of JVM. The interviewers supposed memory was freed without being subject to GC. I asked to discuss to clarify which hypothesis is right, the interviewers dismissed me. I'm very happy they didn't select m"
Luca D. - "Classes are represented in memory as areas where code and class shared objects are. The JVM use class loader to load classes and unload them if no more required at runtime as specified at https://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html#jls-12.7, to name a very consolidated version of JVM. The interviewers supposed memory was freed without being subject to GC. I asked to discuss to clarify which hypothesis is right, the interviewers dismissed me. I'm very happy they didn't select m"See full answer
"String commonStr(String str1, String str2) {
int len1 = str1.length();
int len2 = str2.length();
if (len1 == 0 || len2 == 0) return "";
// let dpx reprsent the longest common str of 0...x
int dp = new int len1 + 1;
int maxLen = 0;
int endIndex = 0;
for (int i = 1; i <= len1; i++) {
for (int j = 1; j <= len2; j++) {
if (str1.charAt(i-1) == str2.charAt(j-1)) {
dpi = dpi-1 + 1;
"
Anonymous Eel - "String commonStr(String str1, String str2) {
int len1 = str1.length();
int len2 = str2.length();
if (len1 == 0 || len2 == 0) return "";
// let dpx reprsent the longest common str of 0...x
int dp = new int len1 + 1;
int maxLen = 0;
int endIndex = 0;
for (int i = 1; i <= len1; i++) {
for (int j = 1; j <= len2; j++) {
if (str1.charAt(i-1) == str2.charAt(j-1)) {
dpi = dpi-1 + 1;
"See full answer