3 java questions: debugging, templating and Swing app for Texts cleansing
// __ how do you debug debug:
~
Exception in thread "main" java.lang.OutOfMemoryError: Java heap
space
~
kinds of errors?
~
// __ How can you make this method taking in an array on ints and
enlarging it, make the same thing for long[]('s), byte[]('s) in fact
any possible array.
~
// __ (((iAr != null) && ((iArL = iAr.length) > 0)) || (iNwL > 0))
public int[] _enlargeIntArr(int[] iAr, int iNwL) throws
InputContextException{
boolean Is = false;
int[] iNwAr = null;
int iArL;
// __
if((iAr != null) && ((iArL = iAr.length) > 0)){
if(iNwL > iArL){
iNwAr = new int[iNwL];
System.arraycopy(iAr, 0 , iNwAr, 0, iNwL);
iAr = null;
System.gc();
}// (iNwL > iArL)
else{
String aX = "// __ New Length must be greater than previous one.
iNwL: |" + iNwL + "|, iArL: |" + iArL + "|";
throw new InputContextException(aX);
}
}// ((iAr != null) && ((iArL = iAr.length) > 0))
else if(iNwL > 0){ iNwAr = new int[iNwL]; }
else{
String aX = "// __ New Length must be greater than 0. iNwL: |" +
iNwL + "|";
throw new InputContextException(aX);
}
// __
return(iNwAr);
}
~
// __ Do you know of any swing application to compare two text files,
partially programatically, partially by eyeballing them?
The j app. should syncronize teh scrolling of both texts to that the
same section would be visible even if you scroll one of them
~
thanks
lbrtchx