Matches in DBpedia 2016-04 for { <http://dbpedia.org/resource/Field_encapsulation> ?p ?o }
Showing triples 1 to 30 of
30
with 100 triples per page.
- Field_encapsulation abstract "In computer programming, field encapsulation involves providing methods that can be used to read from or write to the field rather than accessing the field directly. Sometimes these accessor methods are called getX and setX (where X is the field's name), which are also known as mutator methods. Usually the accessor methods have public visibility while the field being encapsulated is given private visibility - this allows a programmer to restrict what actions another user of the code can perform. Compare the following Java class in which the name field has not been encapsulated:public class NormalFieldClass { public String name; public static void main(String[] args) { NormalFieldClass example1 = new NormalFieldClass(); example1.name = \"myName\"; System.out.println(\"My name is \" + example1.name); }}with the same example using encapsulation:public class EncapsulatedFieldClass { private String name; public String getName() { return name; } public void setName(String newName) { name = newName; } public static void main(String[] args) { EncapsulatedFieldClass example1 = new EncapsulatedFieldClass(); example1.setName(\"myName\"); System.out.println(\"My name is \" + example1.getName()); }}In the first example a user is free to use the public name variable however they see fit - in the second however the writer of the class retains control over how the private name variable is read and written by only permitting access to the field via its getName and setName methods.".
- Field_encapsulation wikiPageID "1727391".
- Field_encapsulation wikiPageLength "3797".
- Field_encapsulation wikiPageOutDegree "15".
- Field_encapsulation wikiPageRevisionID "615479396".
- Field_encapsulation wikiPageWikiLink Category:Code_refactoring.
- Field_encapsulation wikiPageWikiLink Class_(computer_programming).
- Field_encapsulation wikiPageWikiLink Computer_programming.
- Field_encapsulation wikiPageWikiLink Debugging.
- Field_encapsulation wikiPageWikiLink Embedded_system.
- Field_encapsulation wikiPageWikiLink Field_(computer_science).
- Field_encapsulation wikiPageWikiLink Inline_function.
- Field_encapsulation wikiPageWikiLink Java_(programming_language).
- Field_encapsulation wikiPageWikiLink Method_(computer_programming).
- Field_encapsulation wikiPageWikiLink Mutator_method.
- Field_encapsulation wikiPageWikiLink Operating_system.
- Field_encapsulation wikiPageWikiLink Real-time_computing.
- Field_encapsulation wikiPageWikiLink Side_effect_(computer_science).
- Field_encapsulation wikiPageWikiLink Variable_(computer_science).
- Field_encapsulation wikiPageWikiLinkText "Field encapsulation".
- Field_encapsulation wikiPageUsesTemplate Template:Unreferenced.
- Field_encapsulation subject Category:Code_refactoring.
- Field_encapsulation comment "In computer programming, field encapsulation involves providing methods that can be used to read from or write to the field rather than accessing the field directly. Sometimes these accessor methods are called getX and setX (where X is the field's name), which are also known as mutator methods.".
- Field_encapsulation label "Field encapsulation".
- Field_encapsulation sameAs Q5446993.
- Field_encapsulation sameAs m.05rj6r.
- Field_encapsulation sameAs Інкапсуляція_поля.
- Field_encapsulation sameAs Q5446993.
- Field_encapsulation wasDerivedFrom Field_encapsulation?oldid=615479396.
- Field_encapsulation isPrimaryTopicOf Field_encapsulation.