Skip to main content

Posts

Showing posts with the label coding

How To Create A Simple Analog Clock

  How To Create A Simple Analog Clock #JAVA #CSS #HTML #coding #tutorial First you will need to include javascript, Html and CSS codes in your text editor as follows; Lets first add  HTML CODES  as below; <div class="clock"> <div class="hour"> <div class="hr" id="hr"></div> </div> <div class="min"> <div class="mn" id="mn"></div> </div> <div class="sec"> <div class="sc" id="sc"></div> </div> </div> After you have inserted the Html code in your text editor you will have now to edit Css code using embedded style, where by the css codes are inserted in between <style> </style>tags, which are normally placed in between <head></head> tags of a html file. The css codes are used to apply formatting to the whole clock . Therefore the  CSS codes  will be inserted as follows; body { display:

Encapsulation in JAVA, a Brief explanation

It is a process of  wrapping   up  the  data members  along with related  data handlers method  is called  Encapsulation . Wrapping up the data members and data handlers method means we are grouping both as a single unit. In Java, we group or wrap both inside the Class, so Class is a single unit that consists of data members as well as methods. As shown in the figure. So, the class having both data members and related data handler method is called  Encapsulated Class. Here in the above definition, two important terms have been used i.e,  data members,  and  data handlers method. Data members:  The variables which are declared inside the class. Data handlers Method:  It is just a usual method, whose only purpose is to initialized or return the value of data members present inside the Class. Such types of methods do not use for writing any business logic or functionality.  #knowledgestreams.blogspot.com Types of Data Handler Method Getter Method:  It is used to return the value of  priva