Break OO privacy: Difference between revisions
Replace println() with print(); replace output "syntaxhighlight" tag with "pre" tag
(Add Ecstasy example) |
(Replace println() with print(); replace output "syntaxhighlight" tag with "pre" tag) |
||
Line 459:
Exposed expo = new Exposed();
console.
// you can only access public members from the default reference
Line 482:
expoStr.pri = $"{expoStr.pri}!!!";
console.
}
}
</syntaxhighlight>
{{out}}
<pre>
before: pub="public", pro="protected", pri="private"
after: pub="this was public!!!", pro="this was protected!!!", pri="this was private!!!"
</pre>
=={{header|F_Sharp|F#}}==
|