Actually, there is no function you can call to include a JavaScript file within another one. This is the bad news.
The good news is that you can use a trick to accomplish this task. Suppose you have two JavaScript files,
say file1.js and file2.js. You want to include file1.js within file2.js because you want to use file1’s functions.
Here is the code you can use:
//this is file2.js
document.write("<script src='file1.js' type='text/javascript'></script>");
// here you can use functions defined in file1.js
As you can see it suffices “to write” in the browser the code you generally use to include a JavaScript file within an
HTML file and you’re done!
It’s a common misconception thinking (or worse teaching!) that, in Java, primitives are passed by value and objects
by reference. Actually, everything in Java is passed by value as well as object references.
When a parameter is passed by value, an actual copy of it is really passed so that any change made will have only a
local effect. For example:
publicstaticvoidmain(String[]args){inta=0;increment(a);System.out.println(a);//it prints 0 so increment didn't work as expected}publicstaticintincrement(inta){++a;System.out.println(a);//it prints 1returna;}
As you can see the change made to the parameter passed to increment, that is a, affects only the local copy of it.
This proves that Java passes primitives by value.
Sometimes you need to execute dynamic SQL statements. Starting from Oracle8i you can accomplish this task using the
EXECUTE IMMEDIATE statement. Here are three examples of how you can take advantage of this great statement.
sql_select:='SELECT * FROM your_table WHERE field1 = :1';EXECUTEIMMEDIATEsql_selectINTOyour_cursorUSINGyour_parameter_for_field1;
In this first example I showed how you can use EXECUTE IMMEDIATE to execute the query and put the result into a cursor.
The USING your_parameter_for_field1 part replaces the :1 bind variable with the value contained in the
your_parameter_for_field1 parameter.