<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Thayana Selvaratnam on Medium]]></title>
        <description><![CDATA[Stories by Thayana Selvaratnam on Medium]]></description>
        <link>https://medium.com/@sthayana13?source=rss-2cf3a5e23c93------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*q75GOVxX-ZV-FrrOEWXF6w.jpeg</url>
            <title>Stories by Thayana Selvaratnam on Medium</title>
            <link>https://medium.com/@sthayana13?source=rss-2cf3a5e23c93------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 18:07:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sthayana13/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Inheritance (Object Oriented Concept) in Java]]></title>
            <link>https://medium.com/@sthayana13/inheritance-object-oriented-concept-in-java-4764a26f3d9d?source=rss-2cf3a5e23c93------2</link>
            <guid isPermaLink="false">https://medium.com/p/4764a26f3d9d</guid>
            <dc:creator><![CDATA[Thayana Selvaratnam]]></dc:creator>
            <pubDate>Thu, 01 Oct 2020 09:32:16 GMT</pubDate>
            <atom:updated>2020-10-01T09:32:16.367Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZbP0WohKsPytIqu_a2_o6w.png" /></figure><p>Inheritance is like a father and son relationship.We use inheritance only if there is a parent child relationship.Inheritance is expressed using the relationship: “is a”.</p><p><strong>subclass and superclass / child class and parent class</strong></p><p>A class that is derived from another class is called a subclass (child class). The<br>class from which the subclass is derived is called a superclass ( parent class).</p><p>For Example:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*eqhf0Ygz_SpMF6Qpe9uEbQ.png" /></figure><p>Cat is a Animal, but all the Animals are not cars.<br>Dog is a Animal, but all the Animals are not dog.<br>Lion is a Animal, but all the Animals are not lion.</p><p><strong><em>*. Inheritance is expressed using the relationship: “is a”.</em></strong></p><p><strong>Advantages:- </strong>Code duplication can be minimized.</p><p><strong>extends keyword</strong></p><p>class Parent {<br> <em>// Members and methods declarations in here.</em><br> }<br> class Child extends Parent {<br> <em>// Members and methods from Parent are inherited.<br> // Members and methods declarations of Child.</em><br> }</p><p><strong>Node:-</strong></p><ol><li>As all fields and methods of the parentclass are inherited, they can be used by the childclass.</li><li>Private members of the parentclass cannot be accessed directly from the childclass.</li><li>Constructors, Static Blocks, Instance Blocks of super class will not be inherited to its sub class. But they can be invoked from the subclass.</li></ol><p><strong>Single Inheritance :- </strong>class Cat extends Animal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*GPP3TX7Yz0MjjatQ5HvcvQ.png" /></figure><p><strong>Multilevel Inheritance</strong></p><p>Multilevel inheritance refers to a mechanism in Object oriented technology where one can inherit from a derived class, thereby making this derived class the base class for the new class.</p><p><strong>Multiple Inheritance</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*Xh9pYAkWCqV4GzXPjB4yJg.png" /></figure><p>A class extends more than one class, But multiple Inheritance is not supported by Java.</p><p><strong>Example 01:-</strong></p><p>class Parent {</p><p>public void parmethod() {</p><p>System.out.println(“ Parent is print”);</p><p>}</p><p>}</p><p>class Child extends Parent {</p><p>public void chimethod() {</p><p>System.out.println(“ Child is print”);</p><p>}</p><p>public static void main(String[] args) {</p><p>Child object = new Child();</p><p>object.parmethod(); // Parent is print</p><p>object.chimethod(); // Child is print</p><p>}</p><p><strong>Example 02:-</strong></p><p>class Parent {</p><p>public void parmethod() {</p><p>System.out.println(“ Parent is print”);</p><p>}</p><p>}</p><p>class Child extends Parent {</p><p>public void chimethod() {</p><p>System.out.println(“ Child is print”);</p><p>}</p><p>public static void main(String[] args) {</p><p>Parent object = new Child();</p><p>object.parmethod(); // Parent is print</p><p>object.chimethod(); // Child is print</p><p>}</p><p><strong>Example 03:-</strong></p><p>class Superclass{</p><p>int x= 15;</p><p>}</p><p>class Subclass extends Superclass {</p><p>int x= 20;</p><p>void show() {</p><p>System.out.println(x); //20</p><p>System.out.println(super.x); // 15</p><p>super.x = 30;</p><p>System.out.println(x); // 20</p><p>System.out.println(super.x); // 30</p><p>}</p><p>public static void main(String… args) {</p><p>new Subclass().show();</p><p>}</p><p>}</p><p><strong>Example 04:-</strong></p><p>Class Super1{</p><p>public void method1() {</p><p>System.out.println(“Class Super1 method”);</p><p>}</p><p>}</p><p>Class Sub2 extends Super1{</p><p>public void method2() {</p><p>System.out.println(“class Sub2 method”);</p><p>}</p><p>}</p><p>Class Sub3 extends Sub2{</p><p>public void method3() {</p><p>System.out.println(“class Sub3 method”); }</p><p>public static void main(String args[]) {</p><p>Sub3 obj = new Sub3();</p><p>obj.method1(); //calling grand parent class method</p><p>obj.method2(); //calling parent class method</p><p>obj.method3(); //calling local method</p><p>}</p><p>}</p><blockquote>Thank You.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4764a26f3d9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Abstraction (Object Oriented Concept) in Java]]></title>
            <link>https://medium.com/@sthayana13/abstraction-object-oriented-concept-in-java-551dcf19ad0?source=rss-2cf3a5e23c93------2</link>
            <guid isPermaLink="false">https://medium.com/p/551dcf19ad0</guid>
            <dc:creator><![CDATA[Thayana Selvaratnam]]></dc:creator>
            <pubDate>Tue, 01 Sep 2020 07:36:25 GMT</pubDate>
            <atom:updated>2020-09-01T07:36:25.873Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*qrnScEs5blGI8jJZl4blaA.png" /></figure><p>Abstraction is a process of hiding the implementation details and showing only functionality to the user. For Example consider one person drive a car, only show how car is work,hiding the what engine do inside of the car.</p><p>We can achieve abstraction in two ways. One is <strong>Abstract class</strong> (partial abstraction), other one is<strong> Interface</strong>( 100% abstract class).</p><p><strong>Abstract class</strong></p><p>Abstract class is a class that is declared with abstract keyword. An abstract class have abstract methods (methods without body that is declared abstract without an implementation ), non-abstract methods (methods with body), constructor and main() method.</p><p><strong>Node- 01</strong> :- If there is any abstract method in a class, that class must be abstract.<br><strong>Node- 02</strong> :- All abstract methods must be public.<br><strong>Node- 03</strong> :-A class can’t be both abstract and final.</p><p>Example for abstract class :-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IMuMJUrLDHF9ZXasDvwA5A.png" /></figure><p><strong>Abstract method</strong></p><p>An abstract method is a method that is declared abstract without an implementation.</p><p>Example abstract method</p><p>abstract public void methodA(); // abstract method not contains body and braces.</p><p><strong><em>NODE:-</em></strong>If there is any abstract method in a class, that class must be abstract.</p><p>Example for abstract class :-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R4fCYkijSPKKvs5lMdwa0w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=551dcf19ad0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enum Data Type in Java]]></title>
            <link>https://medium.com/@sthayana13/enum-data-type-in-java-9edfc3ee4f1c?source=rss-2cf3a5e23c93------2</link>
            <guid isPermaLink="false">https://medium.com/p/9edfc3ee4f1c</guid>
            <dc:creator><![CDATA[Thayana Selvaratnam]]></dc:creator>
            <pubDate>Sun, 03 May 2020 05:53:55 GMT</pubDate>
            <atom:updated>2020-05-03T05:53:55.285Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bc_qZ8iV0SkD-wqOHEhmZA.png" /></figure><p>An ‘enum’ is a special “class” in java. This class available in java.lang package. Enumerated data types are used to represent a group of named constants in Java.</p><p>To create an enum, use the ‘enum’ keyword, separate the constants with a comma, and they should be in uppercase letters.</p><p><strong>For Example 1 :-</strong></p><p><em>enum Animal{ CAT, DOG, ELEPHANT }</em></p><p><strong>Example 2:-</strong></p><p><em>enum </em>Day{ SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY }</p><p><strong>NODE :-</strong> <strong>enum data types can be declared outside a Class or inside a Class but not inside a Method, and also we can declare main() method inside enum.</strong></p><ol><li><strong>Declared outside a Class</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*jnJnPNUu3e1Ow_tiKggNGw.png" /></figure><p><strong>2. Defined inside the class</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0QwXepwv1MR_j9LAif0Q7w.png" /></figure><p><strong>3. Declare main() method inside enum</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KsBr9AxAL6V_UktEZnox1Q.png" /></figure><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9edfc3ee4f1c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simply develop Angular project for beginners.]]></title>
            <link>https://medium.com/@sthayana13/simply-develop-angular-project-for-beginners-e2fb481b54f7?source=rss-2cf3a5e23c93------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2fb481b54f7</guid>
            <dc:creator><![CDATA[Thayana Selvaratnam]]></dc:creator>
            <pubDate>Fri, 01 May 2020 06:24:37 GMT</pubDate>
            <atom:updated>2020-05-01T06:24:37.436Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*AL6Zs3X8RZRgW1UThmo4vA.png" /></figure><p>This article is all about how you can develop your Angular application in the first time. Basically Angular framework special purpose to build client side applications. Angular version are changed twice a year.</p><p>In this article cover all main concept of angular, prerequisites of angular, what are the development environment for the angular and develop the simple angular application.</p><p><strong>Angular prerequisites are </strong>:- HTML, CSS, Java script and basics of typescript.</p><p><strong>Development environment</strong> :- Node, npm, Angular CLI, Text editor( visual studio code)</p><p><strong>develop the simple angular application :- </strong>when we create a simple angular application,</p><ol><li>Download the nodejs then install nodejs</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ku8Fr8QJfKGL4Nih4jjeXA.png" /><figcaption>Download the nodejs</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*wBGSQ-YfOw5tRmccAVP7vQ.png" /><figcaption>Install nodejs in your labtop</figcaption></figure><p>If you like to <strong>find the nodejs version</strong> then go to the “start →command prompt(right click) → run as administator → type the command in the command prompt “node -v”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oBvhBO-ZLaGU2aw0CwrwGQ.png" /><figcaption>here nodejs version is <strong>V10.15.1</strong></figcaption></figure><p><strong>Find the npm version </strong>:-<strong> </strong>Inside the command prompt write the command ”npm -v”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/278/1*JDLq0qh8fVYE6YPyEpqvRg.png" /><figcaption>here npm version is 6.4.1</figcaption></figure><p>2. <strong>Install the angular CLI </strong>:- Inside the command prompt write the command ”install -g@angular/CLI”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*v1kPyh46vMsQmfdzHo4Drw.png" /></figure><p>3. Install test editor (for example :- visual studio code)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8uJ-piiiOktOSCpXK5SdtQ.png" /></figure><p>4.Last we can create a new project in angular in the Vs code terminal. Inside the terminal write the command ”ng new project_name”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/409/1*ZKez-CaQu3ENtj1mD7vJwg.png" /><figcaption>here angular project name is ‘projectang’</figcaption></figure><p>after create the angular project, open the project into VS code and run the project into VS code terminal. then view the project into google chrome.</p><ul><li><strong>run the angular project</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7H8nDrA0pD7yP4bYGOfxmw.png" /></figure><ul><li>View the project into google chrome. “<a href="http://localhost:4200/">http://localhost:4200/</a>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3jtsqH49Jn4gdchiWGwjfw.png" /></figure><p>Angular project created now!.</p><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2fb481b54f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>