<?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 Usman Khalid on Medium]]></title>
        <description><![CDATA[Stories by Usman Khalid on Medium]]></description>
        <link>https://medium.com/@usmankhalid_97307?source=rss-c91605828baf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*num1__qhrCn0fgYP.</url>
            <title>Stories by Usman Khalid on Medium</title>
            <link>https://medium.com/@usmankhalid_97307?source=rss-c91605828baf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 23:15:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@usmankhalid_97307/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[The String (Buffer/Builder)]]></title>
            <link>https://medium.com/@usmankhalid_97307/the-string-buffer-builder-cee2d17290f3?source=rss-c91605828baf------2</link>
            <guid isPermaLink="false">https://medium.com/p/cee2d17290f3</guid>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Usman Khalid]]></dc:creator>
            <pubDate>Fri, 26 Jan 2018 15:07:44 GMT</pubDate>
            <atom:updated>2018-12-19T08:04:55.080Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>String</strong> is immutable ( once created can not be changed )object . The object created as a String is stored in the Constant String Pool. Every immutable object in Java is thread safe ,that implies String is also thread safe . String can not be used by two threads simultaneously. String once assigned can not be changed.</p><p><strong>StringBuffer</strong> is mutable means one can change the value of the object . The object created through StringBuffer is stored in the heap. StringBuffer has the same methods as the StringBuilder , but each method in StringBuffer is synchronized that is StringBuffer is thread safe . Due to this it does not allow two threads to simultaneously access the same method . Each method can be accessed by one thread at a time . But being thread safe has disadvantages too as the performance of the StringBuffer hits due to thread safe property . Thus StringBuilder is faster than the StringBuffer when calling the same methods of each class. String Buffer can be converted to the string by using <em>toString()</em> method.</p><p><em>StringBuffer demo1 = new StringBuffer(“Hello”) ;</em> // The above object stored in heap and its value can be changed .</p><p><em>demo1=new StringBuffer(“Bye”); // Above statement is right as it modifies the value which is allowed in the StringBuffer</em></p><p><strong>StringBuilder</strong> is same as the StringBuffer , that is it stores the object in heap and it can also be modified .</p><blockquote>The main difference between the StringBuffer and StringBuilder is that StringBuilder is not thread safe.</blockquote><p>StringBuilder is fast as it is not thread safe .</p><p>StringBuilder demo2= new StringBuilder(“Hello”); // The above object too is stored in the heap and its value can be modified</p><p>demo2=new StringBuilder(“Bye”); // Above statement is right as it modifies the value which is allowed in the StringBuilder</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cee2d17290f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Backpacking Salala (صلالة‎‎) Oman]]></title>
            <link>https://medium.com/@usmankhalid_97307/backpacking-salala-%D8%B5%D9%84%D8%A7%D9%84%D8%A9-oman-42775cf0507?source=rss-c91605828baf------2</link>
            <guid isPermaLink="false">https://medium.com/p/42775cf0507</guid>
            <category><![CDATA[dubai]]></category>
            <category><![CDATA[oman]]></category>
            <category><![CDATA[travel]]></category>
            <dc:creator><![CDATA[Usman Khalid]]></dc:creator>
            <pubDate>Wed, 06 Sep 2017 13:36:07 GMT</pubDate>
            <atom:updated>2017-09-06T19:45:17.974Z</atom:updated>
            <content:encoded><![CDATA[<h3>Backpacking Salala (Salalah) Oman</h3><p>Eid-ul-Adha was near and my wild side was kicking in. I didn’t want to waste the 5 days holiday contemplating my life. I did what every man does, call a friend who’s unmarried or have long distance <em>whatsapp</em> relationships. Things started looking promising as I managed to convince 2 people to join when I miscalculated the trip budget to be around 300–350 AED.</p><p>On Thursday 31st August, we planned to start the trip. I called the convinced friends one last time for sanity check. As suspected, one of the friend realized my miscalculations, bailed on me and decided not to reply right on time.I would not hesitate to say his name. Farhan Ahmad!!! yes you Farhan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*VPa8YYEiRm-4RXdyEDfkBw.png" /><figcaption>9hrs of boredom</figcaption></figure><p>We started from Al-Barsha Heights to <a href="https://goo.gl/maps/5ZhamaKyAYH2">Mazyad Border Post</a> in Al-Ain where we spent 35 AED exit fee,80 AED for AHLIA Oman insurance and 50 AED Oman entrance fee. Oman has become pretty tech savy and has started <a href="http://www.rop.gov.om/">e-visa</a> service for UAE residents.From <a href="https://goo.gl/maps/5ZhamaKyAYH2">Mazyad Border Post</a> we drove to <a href="https://goo.gl/maps/h4zNg5yJksx">Ibri</a> in 1.5 hrs and instead of going to Nizwa from there we took a shortcut and reached Salala in 9 hrs. The road is a one way road and barren plain ground around it. It was not at all fun driving 9 hrs especially when the FM radio stations refuse to work and all I had to listen to was my friend’s crazy theories about evolution of life and existence of aliens in parallel universe.Be aware of the camel signs on the road as one camel managed to get in our way as we were cruising at 200km/hr and my friend was not happy with it. Those Mustang drivers are very unfamiliar with the brakes.They only know how to race.Maybe the camel just wanted to claim insurance for its kids. Yeah living in desert is just not easy. The road surroundings made me underestimate the beauty of Salala(صلالة‎‎).</p><p>65 kms to Salala(صلالة‎‎) and I could see why the place is a popular tourist attraction. The mountain range started showing up ahead. The mountains started changing their colors. Firstly we saw the brown rock mountains which turned to black and suddenly it turned to green with clouds trapped between them. After 9 hours of looking at barren sand ground it definitely looked like a heaven on earth to me.</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DvLvdiggHS7s&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FvLvdiggHS7s&amp;type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8843f241ef2c6037834aab4d0ff4b415/href">https://medium.com/media/8843f241ef2c6037834aab4d0ff4b415/href</a></iframe><p>Life without internet can be boring sometimes even in Salala and we bought our first item from Salala i.e OmanTel sim card which was 1.8 OMR and started navigation. The places we visited were the <a href="https://en.wikipedia.org/wiki/Tomb_of_Job">tomb of Prophet Ayub</a> (The tomb of Job) , <a href="https://www.tripadvisor.com/Attraction_Review-g298419-d4677731-Reviews-Nabi_Umran_A_S_Tomb-Salalah_Dhofar_Governorate.html">Prophet Omran</a> and the fruit market where we sipped coconut juice and took some bananas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IwQVojNRbMnBS9P_yTSehg.jpeg" /><figcaption>local fruit market</figcaption></figure><p>The next day we hiked to <a href="https://www.youtube.com/watch?v=pUc0Z4XSk6A">AYN KHOR</a> and made some Saudi friends who seemed more adventurous as they travelled more than 2200 km to reach there and can only say yes/no in English.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QTQwCK3D4j9Nvt_YnkewAg.jpeg" /><figcaption>Marneef cave</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*syTfs1KbzKaunEpWg4eUow.jpeg" /><figcaption>Beach near Marneef cave</figcaption></figure><p>After hiking back from AYN KHOR to our car we cruised to Marneef Cave which was an amazing view of the beach and some blow holes with pressurized water. It was an amazing view. We camped there for a while.</p><p>We bid farewell to Salala and started to travel back to Dubai where we started.</p><blockquote><strong>There is no real ending. It’s just the place where you stop the story.” <br>― </strong><a href="https://www.goodreads.com/author/show/58.Frank_Herbert"><strong>Frank Herbert</strong></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42775cf0507" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>