Content deleted Content added
No edit summary |
StuartMurray (talk | contribs) m changed int copy = null to int copy = 0, because the former is illegal in java 1.6 (and possibly earlier versions), also fixed a typo '<' becan '(' |
||
Line 6:
//Fig. 1 (Java Code)
int original = 42;
int copy =
//Copies contents original to copy (replaces copy's original value)
copy = original;
Line 20:
In object-oriented programming, everything is encapsulated in entities called objects. Objects can contain methods, which can be user defined or inheirited from their superclass. They can also contain variables holding any datatype, including their array types. Objects generally are created by using the popular new keyword:
<pre>
//Fig. 3
Object myObj = new Object();
</pre>
|