Q:

Explain warning: non-varargs call of varargs method with inexact argument type for last parameter

This is my sample code where i am getting the warning.
String lsSQL = foMetaQuery.getSQL();
String  lsNewSQL = replace(lsSQL,"'' {","''{");
lsNewSQL = replace(lsNewSQL," } ''","}''");
lsNewSQL = replace(lsNewSQL," }","}");
lsNewSQL  = MessageFormat.format(lsNewSQL,foSubstitutionArray);
loVSQueryDef.setSQL(lsNewSQL);

The compiler says    

cast to java.lang.Object for a varargs call cast to java.lang.Object[]
  for a non-varargs call and to suppress this warning
lsNewSQL  = MessageFormat.format(lsNewSQL,foSubstitutionArray);

A:

You don't show what type foSubstitutionArray has, but I'll assume it's an array of a type other than Object.
Now, MessageFormat.Format() is a varargs method, which means that you can pass it any number of arguments (well, at least 1) and Java will internally collect them all in an array of objects. However, here you're passing in an array, so Java gets confused: are you trying to pass a single argument (that just happens to be an array), or are you passing in the variable arguments?
If you intend to pass a single argument (unlikely), add a cast to Object:
MessageFormat.format(lsNewSql, (Object) foSubstitutionArray)

If you intend values to be taken from your array, cast to Object[]:
MessageFormat.format(lsNewSql, (Object[]) foSubstitutionArray)

