User`s manual
5 Calling Java from MATLAB
5-28
Note When you define a Java class for use in MATLAB, avoid giving any of 
its methods the same name as a MATLAB built-in function.
How MATLAB Handles Java Exceptions
If invoking a Java method or constructor throws an exception, MATLAB 
catches the exception and transforms it into a MATLAB error. MATLAB puts 
the text of the Java error message into its own error message. Receiving an 
error from a Java method or constructor has the same appearance as receiving 
an error from an M-file.










