<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Souravsing Pardeshi</title>
    <description>The latest articles on DEV Community by Souravsing Pardeshi (@souravsingpardeshi).</description>
    <link>https://dev.to/souravsingpardeshi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F478515%2F4595a393-99cb-4beb-bb0e-6daa9c982d66.jpeg</url>
      <title>DEV Community: Souravsing Pardeshi</title>
      <link>https://dev.to/souravsingpardeshi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/souravsingpardeshi"/>
    <language>en</language>
    <item>
      <title>3.Stringbuilder class in java</title>
      <dc:creator>Souravsing Pardeshi</dc:creator>
      <pubDate>Mon, 21 Feb 2022 08:11:18 +0000</pubDate>
      <link>https://dev.to/souravsingpardeshi/3strinbuilder-class-in-java-220d</link>
      <guid>https://dev.to/souravsingpardeshi/3strinbuilder-class-in-java-220d</guid>
      <description>&lt;p&gt;&lt;strong&gt;Java Stringbuilder class&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Strings in java are immutable (not editable)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;so to make changes in string we use this string builder class which makes the string mutable (editable)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;there are different methods which comes with stringbuilder class as shown below&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---T_ymr0h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8k4m95irpxqhq6vi61vg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---T_ymr0h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8k4m95irpxqhq6vi61vg.png" alt="Image Stringbuilder class in java" width="880" height="830"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;1.Append:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This method will simply append an string to existing string.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2.Insert:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;this will insert an character or strig at given position in given string.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3.Replace:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;this will replace certain part of string with another string.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;it take position of string which need to be replaced.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4.Delete:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;this method will delete certain part of string by taking starting and ending position.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>2. Basic String operations</title>
      <dc:creator>Souravsing Pardeshi</dc:creator>
      <pubDate>Mon, 21 Feb 2022 07:27:35 +0000</pubDate>
      <link>https://dev.to/souravsingpardeshi/2-basic-string-operations-56nj</link>
      <guid>https://dev.to/souravsingpardeshi/2-basic-string-operations-56nj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Declaring string and assigning value to it&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class main{
    public static void main(String[] args){
        String str1 = " hello world";
        System.out.println(str1);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Concatination of strings&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class main{
    public static void main(String[] args){
        String str1 = " hello world";
        String str2 = "India";
        String str3 = str1+str2;
        System.out.println(str3);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Accessing element from its position&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class main{
    public static void main(String[] args){
        String str1 = " hello world";
        //charAt(pos) is used to access element in string at pos position.
        System.out.println(str1.charAt(2));
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Getting substring from string&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class main{
    public static void main(String[] args){
        String str1 = " hello world";
        //substring get substring from a string by accepting starting and ending position.
        System.out.println(str1.substring(2,4));
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Using split method&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class main{
    public static void main(String[] args){
        String str1 = "A,B,C,D";
        String str2 = "H I J k";
        //will split string by using , as identifier
        String [] arr1 = str1.split(",");
        // will split string by using space as identifier
        String [] arr2 = str2.split(" ");
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;String inbuilt methods&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class main{
    public static void main(String[] args){
        String str1 = " hello world";
        // will return length of string
        System.out.println(str1.length());
        // will convert all char to uppercase
        System.out.println(str1.toUpperCase());
        //check if string starts with "h"
        System.out.println(str1.startsWith("h"));
        //check if string ends with "h"
        System.out.println(str1.endsWith("h"));
        //will find index of "ll"
        System.out.println(str1.indexOf("ll"));
        // will return index of last occurence if "hello"
        System.out.println(str1.lastIndexOf("hello"));
        //will replace hello with bye
        System.out.println(str1.replace("hello", "bye"));
        System.out.println(str1);
        System.out.println(Integer.toBinaryString(a));
        System.out.println(Integer.toHexString(a));
        System.out.println(Integer.parseInt(Integer.toString(a)));
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>java</category>
      <category>programming</category>
    </item>
    <item>
      <title>1.Main Method in java</title>
      <dc:creator>Souravsing Pardeshi</dc:creator>
      <pubDate>Mon, 21 Feb 2022 07:05:49 +0000</pubDate>
      <link>https://dev.to/souravsingpardeshi/1main-method-in-java-38bc</link>
      <guid>https://dev.to/souravsingpardeshi/1main-method-in-java-38bc</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class main{
    public static void main(String[] args)
    {
        //code
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;entry level is main method.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;this method is public so it can be easily found by jvm.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;void because not expected to return anything.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;static so no need to create object of class for execution.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;String[] args are array of string as arguments for code.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
