<?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 Hasan Naghiyev on Medium]]></title>
        <description><![CDATA[Stories by Hasan Naghiyev on Medium]]></description>
        <link>https://medium.com/@hasanvn?source=rss-601155677fb4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*pR9Z_0CHw8AmyQFz.jpg</url>
            <title>Stories by Hasan Naghiyev on Medium</title>
            <link>https://medium.com/@hasanvn?source=rss-601155677fb4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 05:14:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hasanvn/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[StringTokenizer in Javada İstifadəsi]]></title>
            <link>https://medium.com/@hasanvn/stringtokenizer-in-javada-i%CC%87stifad%C9%99si-a436f7473517?source=rss-601155677fb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/a436f7473517</guid>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Hasan Naghiyev]]></dc:creator>
            <pubDate>Sat, 01 Aug 2020 10:21:38 GMT</pubDate>
            <atom:updated>2020-08-01T10:21:38.957Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pJlx2uNXIWNYOhIioB9-mw.png" /></figure><p>StringTokenizer in Javada İstifadəsi</p><p>Salam, mən bü gün Javada StringTokenizer haqda danişacam. İlk öncə StringTokenizer nədir?</p><p>StringTokenizer verilən mətinnən sözləri bir bir əldə etmək üçün istifadə olunur və hər sözdən sonra symbollari silmək və bizə sözün özünü heç bir simbolsuz əldə etmək imkani verir.</p><p>Bügün biz StringTokenizer in 2 dene constructoruna baxacıyıq.</p><p>İlk constructor yalnizca text gotürür və default olaraq özü bidənə space delimiter qoyur.</p><p>Birdənə sadə kod nümunəsinə baxaq</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*HTw2UFwiHZpib4kedvVezA.jpeg" /></figure><p>Bu kod nümunəsində, biz StringTokenizer classının obyektini yaratdıq və parametr olaraq yalniz text ötürdük. Və nəticəyə baxaq</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*Fe5DI6CKYJi7YyFb9mR4WQ.jpeg" /></figure><p>Biz indi sözləri ayri ayriliqda əldə etdik. Belə sual yaranir, bu bizə nə zaman lazim olacaq. Məsələn biz file larla işliyirik və bize fayldan uzunlugu 5 den kicik adlari çəkmək lazimdi ve biz bunu rahatliqla StringTokenizer ilə edə bilerik.</p><p>Indi Sade bir kod yazacam, Stringde bir cümle saxliyacam və ordan uzunluğu 5 dən böyük olan sözləri oxuyacam</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pxXSvleRyc7sj03W2ndufg.jpeg" /></figure><p>Bu kod nümunəsində biz text Stringinde olan ve uzunlugu 5 dən uzun olan sözləri əldə edə bildik. Neticeyede baxaq</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*o2Y7JDI6dwMPdfaJShzuXA.jpeg" /></figure><p>File larla işləyəndə bele tasklar olur uzunlugu 5 dən böyük və ya bəzi sözleri oxuyanda nəsə dəyişikliklər eləmək ve s.</p><p>Və ikinci olaraq mən StringTokenizer da 2 parametrli constructor haqda danişmaq istiyirəm .</p><p>Bu 2 ci parametr olaraq constructora delimetr symbol set edirik. Məsələn biz istiyirikki yalnız sözləri oxuyaq String dən yanindaki vergül, nida və başqa simvollar olmasin. Bunun ucun sade kod numunesi yazaq.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qxUzqOpRZxmEFNSw08eiiw.jpeg" /></figure><p>Men textimə simvollar əlavə elədim random olaraq ama oxuyanda istiyiremki təkce sözləri oxuyum simvollar olmasin, onun üçün hansi simvollari istəmiriksə onları ikinci parametir olaraq constructora ötürürük və nəticəyə baxaq.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*PbgmGLgJ76iLyNuANdAzLQ.jpeg" /></figure><p>Və gördüyümüz kimi sozleri simvollsuz ala bildik.</p><p>Son olaraq burda sual yarana biler “hasMoreElements()” və “nextToken()” methodlari nədir bunlar bir növ iterator classindaki kimidi her defe element tapana kimi next element götürür.</p><p>Bu gunki blogum bu qədər idi. Oxuduğunuz üçün çox sağolun.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a436f7473517" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Encapsulation in OOP and Difference between Object and Class.]]></title>
            <link>https://medium.com/@hasanvn/encapsulation-in-oop-and-difference-between-object-and-class-2cd0ef0985a5?source=rss-601155677fb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cd0ef0985a5</guid>
            <category><![CDATA[class]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[object-oriented]]></category>
            <category><![CDATA[encapsulation]]></category>
            <dc:creator><![CDATA[Hasan Naghiyev]]></dc:creator>
            <pubDate>Wed, 24 Jun 2020 13:54:52 GMT</pubDate>
            <atom:updated>2020-06-24T17:04:12.912Z</atom:updated>
            <content:encoded><![CDATA[<p>Firstly, let’s talk about what is Class. Class is just file that declare the structure of the Object. For example, we have the following Student class in the below image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jM8J43ktUW5cVge-3pzmIw.jpeg" /></figure><p>As in the attached image, these properties and function of Class define the structures of Object.</p><blockquote><strong>Remark</strong>: <strong>Properties of Class are called members.</strong></blockquote><p><strong>Functions of Class are called methods.</strong></p><p>Secondly, what is Object and what makes Objects different than Class. Object is just an instance or copy of Class. We can say that we have one Student class, but we can have an instance of unlimited numbers of Student Class. When we compile our program, we will have one Class like “Student.class”, however, without getting an instance of it, we cannot use the properties and functions of this Class, while they are not <strong>static</strong>.</p><p>Finally, l will talk about encapsulation in Java. Encapsulation is one of the four principles of OOP in Java. Encapsulation’s purpose or work is to keep the properties of the class safe from outside interference and misuse. In order to apply encapsulation, all the members or properties of the class should be private. <strong>Now there is a question — -How can we access our properties</strong>? Answer to this question is that we will have getter and setter for each member of Class and via that getter and setter method, we will access properties.</p><p>Now in the following code let’s see how l applied encapsulation to my previous code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e38UFumY4DbUHuD1cbxGtw.jpeg" /></figure><p>As you see, l made properties of class private and write public get and set methods in order to access it. Let’s see how l created the object and access to one of these variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nikEPIVvIGsgRuq54uhX9A.jpeg" /></figure><p>As you see, l simply created one object of Student class and setGpa to this student, and then via my public get method, l got the student’s Gpa.</p><p>End of my first Blog, Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cd0ef0985a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>