Include a file: Difference between revisions

m
remove more blank lines
m (→‎{{header|Vala}}: remove blank lines)
m (remove more blank lines)
Line 395:
 
Just this would be enough.
<lang Java>public class Class1 extends Class2
public class Class1 extends Class2
{
//code here
}</lang>
}
</lang>
 
You could also consider creating an instance of Class2 within Class1, and then using the instance methods.
<lang Java>public class Class1
public class Class1
{
Class2 c2=new Class2();
Line 412 ⟶ 409:
c2.func2();
}
}</lang>
}
</lang>
 
=={{header|JavaScript}}==
Line 488 ⟶ 484:
New functions can be included, either by storing a new function in an existing path, or by extending the existing path to a new directory. When two functions have the same name, the function found first in the path takes precedence. The later is shown here:
 
<lang MATLAB> % add a new directory at the end of the path
% add a new directory at the end of the path
path(path,newdir);
addpath(newdir,'-end'); % same as before
Line 495 ⟶ 490:
% add a new directory at the beginning
addpath(newdir);
path(newdir,path); % same as before</lang>
</lang>
 
=={{header|Maxima}}==
2,299

edits