{"id":403,"date":"2007-10-21T00:00:00","date_gmt":"2007-10-21T00:00:00","guid":{"rendered":"http:\/\/www.strongd.net\/?p=403"},"modified":"2007-10-21T00:00:00","modified_gmt":"2007-10-21T00:00:00","slug":"Classes and Objects","status":"publish","type":"post","link":"https:\/\/www.strongd.net\/?p=403","title":{"rendered":"Classes and Objects"},"content":{"rendered":"<p><DIV id=PageTitle>Classes and Objects<\/DIV><br \/>\n<BLOCKQUOTE><!--#usemacro TUT4E_PRELIM (\n)-->With the knowledge you now have of the basics of the Java programming language, you can learn to write your own classes. In this lesson, you will find information about defining your own classes, including declaring member variables, methods, and constructors.<br \/>\n<P>You will learn to use your classes to create objects, and how to use the objects you create. <\/P><br \/>\n<P>This lesson also covers nesting classes within other classes, enumerations, and annotations. <\/P><br \/>\n<H3><A class=TutorialLink href=\"http:\/\/www.strongd.net\/blog\/show\/397\" target=_top>Classes<\/A><\/H3><br \/>\n<BLOCKQUOTE>This section shows you the anatomy of a class, and how to declare fields, methods, and constructors. <\/BLOCKQUOTE><!--\n\n<h3>\n<a class=\"TutorialLink\" target=\"_top\" href=\"subclasses.html\">Getting Started<\/a><\/h3>\n\n\n\n\n<blockquote>\nThis section covers issues relating to class hierarchies:\nhow to override methods, hide methods or member variables,\nhow to use super, the use of final to prevent subclassing,\nthe use of abstract methods and classes.\n<\/blockquote>\n\n\n--><br \/>\n<H3><A class=TutorialLink href=\"http:\/\/www.strongd.net\/blog\/show\/398\" target=_top>Objects<\/A><\/H3><br \/>\n<BLOCKQUOTE>This section covers creating and using objects. You will learn how to instantiate an object, and, once instantiated, how to use the <CODE>dot<\/CODE> operator to access the object&#8217;s instance variables and methods. <\/BLOCKQUOTE><br \/>\n<H3><A class=TutorialLink href=\"http:\/\/www.strongd.net\/blog\/show\/399\" target=_top>More on Classes<\/A><\/H3><br \/>\n<BLOCKQUOTE>This section covers more aspects of classes that depend on using object references and the <CODE>dot<\/CODE> operator that you learned about in the preceding section: returning values from methods, the <CODE>this<\/CODE> keyword, class vs. instance members, and access control. <\/BLOCKQUOTE><br \/>\n<H3><A class=TutorialLink href=\"http:\/\/www.strongd.net\/blog\/show\/400\" target=_top>Nested Classes<\/A><\/H3><br \/>\n<BLOCKQUOTE>Static nested classes, inner classes, anonymous inner classes, and local classes are covered. <\/BLOCKQUOTE><br \/>\n<H3><A class=TutorialLink href=\"http:\/\/www.strongd.net\/blog\/show\/401\" target=_top>Enum Types<\/A><\/H3><br \/>\n<BLOCKQUOTE>This section covers enumerations, specialized classes that allow you to define and use sets of constants. <\/BLOCKQUOTE><br \/>\n<H3><A class=TutorialLink href=\"http:\/\/www.strongd.net\/blog\/show\/402\" target=_top>Annotations<\/A><\/H3><br \/>\n<BLOCKQUOTE>Annotations allow you to add information to your program that is not actually part of the program. This section describes three built-in annotations that you should know about. <\/BLOCKQUOTE><\/BLOCKQUOTE><br \/>\n<DIV><\/DIV><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Classes and Objects With the knowledge you now have of the basics of the Java programming language, you can learn to write your own classes. In this lesson, you will find information about defining your own classes, including declaring member variables, methods, and constructors. You will learn to use your classes to create objects, and &hellip; <a href=\"https:\/\/www.strongd.net\/?p=403\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Classes and Objects<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-403","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=403"}],"version-history":[{"count":0,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/403\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}