×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: Me Myself
Added: Nov 19, 2017 12:41 PM
Views: 2
Tags: no tags
Compare the length for two given arrays what should be equal sized
  1.             if (specFieldName.length!=specFieldValue.length){
  2.                 StackTraceElement[] elements = Thread.currentThread().getStackTrace();
  3.                 diagnoses[0]= elements[1].getClassName() + "." + elements[1].getMethodName();
  4.                 diagnoses[1]= classVersion;
  5.                 diagnoses[2]= "Code Line " + String.valueOf(elements[1].getLineNumber());  
  6.                 diagnoses[3]="FALSE";
  7.                 diagnoses[4]="ERROR:Field names and values arrays with different length";
  8.                 diagnoses[5]="The values in FieldName are:"+ Arrays.toString(specFieldName)+". and in FieldValue are:"+Arrays.toString(specFieldValue);
  9.                 return diagnoses;
  10.             }