<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Crunchify</title>
	
	<link>http://crunchify.com</link>
	<description>We help customers create an effective online presence...</description>
	<lastBuildDate>Mon, 13 Feb 2017 01:43:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	

<image>
	<url>http://crunchify.com/wp-content/uploads/2016/08/favicon-65x65.png</url>
	<title>Crunchify</title>
	<link>http://crunchify.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Crunchify" /><feedburner:info uri="crunchify" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><itunes:explicit>no</itunes:explicit><itunes:subtitle>We help customers create an effective online presence...</itunes:subtitle><feedburner:emailServiceId>Crunchify</feedburner:emailServiceId><feedburner:feedburnerHostname>https://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Best way to Compare String Arrays, Integer Arrays and Strings in Java – “CrunchifyCompare” Overloaded Utility for your Project</title>
		<link>http://feedproxy.google.com/~r/Crunchify/~3/i8bDHmDQs3o/</link>
		<comments>http://crunchify.com/best-way-to-compare-string-arrays-int-arrays-and-strings-in-java-crunchifycompare-utility-for-your-project/#respond</comments>
		<pubDate>Sun, 12 Feb 2017 12:12:43 +0000</pubDate>
		<dc:creator><![CDATA[App Shah]]></dc:creator>
				<category><![CDATA[Core Java and J2EE Tutorials and Tips]]></category>
		<category><![CDATA[Java, J2EE Production Ready Utility]]></category>
		<category><![CDATA[JSON Tutorials and Examples]]></category>
		<category><![CDATA[collection framework]]></category>
		<category><![CDATA[Crunchify Java Utility]]></category>
		<category><![CDATA[CrunchifyCompare() Utility]]></category>
		<category><![CDATA[How to compare two Integer Arrays]]></category>
		<category><![CDATA[How to compare two String Arrays]]></category>
		<category><![CDATA[How to Compare Two Strings]]></category>
		<category><![CDATA[Java guava objects]]></category>
		<category><![CDATA[Java Method Overloading]]></category>
		<category><![CDATA[java.util package utility]]></category>
		<category><![CDATA[Method Overloading]]></category>
		<category><![CDATA[Method Overloading in Java]]></category>

		<guid isPermaLink="false">http://crunchify.com/?p=7924</guid>
		<description><![CDATA[<p>java.util.* package contains so many utilities like collection framework, event model, date facility, time facility and so on. Java doesn&#8217;t provide simple compare utility for primitive types like Compare String Arrays Compare Integer Arrays Simple String compares and so on&#8230; If you have below questions then below tutorial will help you. How to compare two... <br /><a
class="more-link" href="http://crunchify.com/best-way-to-compare-string-arrays-int-arrays-and-strings-in-java-crunchifycompare-utility-for-your-project/">Read Article &#160; <i class="fa fa-chevron-circle-right" aria-hidden="true"></i></a></p>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/best-way-to-compare-string-arrays-int-arrays-and-strings-in-java-crunchifycompare-utility-for-your-project/">Best way to Compare String Arrays, Integer Arrays and Strings in Java &#8211; &#8220;CrunchifyCompare&#8221; Overloaded Utility for your Project</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/in-java8-how-to-convert-array-to-stream-using-arrays-stream-and-stream-of-operations/" rel="bookmark" title="In Java8 &#8211; How to Convert Array to Stream using Arrays.stream() and Stream.of() Operations">In Java8 &#8211; How to Convert Array to Stream using Arrays.stream() and Stream.of() Operations </a></li>
<li><a href="http://crunchify.com/java-program-to-replaceremove-characters-from-string/" rel="bookmark" title="Java Program to Replace/Remove Characters from String">Java Program to Replace/Remove Characters from String </a></li>
<li><a href="http://crunchify.com/how-to-implement-simple-circulararraylist-in-java/" rel="bookmark" title="How to Implement Simple CircularArrayList in Java?">How to Implement Simple CircularArrayList in Java? </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[
<div class="ezAdsense adsense adsense-leadin" style="text-align:center;margin:0px;"><div  style="margin-bottom:20px;margin-top:1px;">
<!-- Crunchify.Post.Top -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-4032710958875645"
     data-ad-slot="7425196307"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

</div>
<div style="clear:both"></div></div>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2015/12/Crunchify-Java-Compare-Utility.png" rel="attachment wp-att-7935"><img class="alignnone size-full wp-image-7935" src="http://cdn.crunchify.com/wp-content/uploads/2015/12/Crunchify-Java-Compare-Utility.png" alt="Crunchify Java Compare Utility" width="1348" height="756" srcset="http://cdn.crunchify.com/wp-content/uploads/2015/12/Crunchify-Java-Compare-Utility.png 1348w, http://cdn.crunchify.com/wp-content/uploads/2015/12/Crunchify-Java-Compare-Utility-768x431.png 768w" sizes="(max-width: 1348px) 100vw, 1348px" /></a></p>
<p><code>java.util.*</code> package contains so many utilities like <a href="http://crunchify.com/what-is-java-collections-framework-benefits-of-collections-framework/" target="_blank">collection</a> framework, event model, date facility, time facility and so on.</p>
<p>Java doesn&#8217;t provide simple compare utility for <a href="http://crunchify.com/java-tip-wherever-possible-try-to-use-primitive-types-instead-of-wrapper-classes/" target="_blank">primitive types</a> like</p>
<ul>
<li>Compare <a href="http://crunchify.com/how-to-reverse-a-string-in-java/" target="_blank">String</a> Arrays</li>
<li>Compare Integer Arrays</li>
<li>Simple String compares</li>
<li>and so on&#8230;</li>
</ul>
<p>If you have below questions then below tutorial will help you.</p>
<ul>
<li>How to compare two arrays in Java?</li>
<li>Comparing two integer arrays in java</li>
<li>In Java compare arraylist</li>
<li>In Java compare collections</li>
<li>In Java <a href="http://crunchify.com/best-way-to-compare-string-arrays-int-arrays-and-strings-in-java-crunchifycompare-utility-for-your-project/" target="_blank">compare arrays</a> for equality</li>
</ul>
<p>In this tutorial we will go over all above 3 <a href="http://crunchify.com/how-to-merge-concat-multiple-jsonobjects-in-java-best-way-to-combine-two-jsonobjects/" target="_blank">utilities</a> with simple <a href="http://crunchify.com/java-insertion-sort-algorithm/" target="_blank">Java</a> <code>Method Overloading</code> concept.</p>
<h3>What is Method Overloading in Java?</h3>
<p>Method overloading means you could have <code>number of methods</code> with the same name as far as you have different parameters for each.</p>
<p>There are <code>two ways</code> you could overload method in java:</p>
<ul>
<li>By having number of <code>different arguments</code></li>
<li>By having the <code>different data types</code></li>
</ul>
<p><code>NOTE:</code> Java <a href="http://crunchify.com/java-method-overriding-examples-and-concepts-overriding-rules/" target="_blank">Method Overriding</a> Tutorial</p>
<p>In our tutorial <code>crunchifyCompare</code> is a utility and <code>overloading method</code> which will perform compare operation based on type of <a href="http://crunchify.com/how-to-increase-tomcat-heapsize-jvm-heap-in-eclipse-ede/" target="_blank">arguments</a>.</p><pre class="crayon-plain-tag">package crunchify.com.tutorial;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/**
 * @author Crunchify.com 
 * Version: 1.0 
 * Updated: 12.27.2015
 */

public class CrunchifyCompareUtility {

	public static void main(String[] args) {
		// Let's compare two Strings
		log("crunchifyCompare(\"Crunchify\", \"Crunchify\"): "
				+ crunchifyCompare("Crunchify", "Crunchify"));
		log("crunchifyCompare(\"Yahoo\", \"Google\"): " + crunchifyCompare("Yahoo", "Google"));

		String arr1[] = { "Crunchify, Yahoo, Google" };
		String arr2[] = { "Crunchify, Yahoo, Google" };
		String arr3[] = { "Crunchify, Facebook, Google" };

		// Compare StringArrays
		log("\ncrunchifyCompare(arr1, arr2): " + crunchifyCompare(arr1, arr2));
		log("crunchifyCompare(arr1, arr3): " + crunchifyCompare(arr1, arr3));

		int arr4[] = { 11, 12, 13 };
		int arr5[] = { 11, 12, 13 };
		int arr6[] = { 12, 13, 14 };

		// Compare IntegerArrays
		log("\ncrunchifyCompare(arr4, arr5): " + crunchifyCompare(arr4, arr5));
		log("crunchifyCompare(arr4, arr6): " + crunchifyCompare(arr4, arr6));

	}

	private static void log(String log) {
		System.out.println(log);
	}

	/**
	 * String Compare Utility
	 * 
	 * @param newData
	 * @param intialData
	 * @return true / false
	 */
	public static boolean crunchifyCompare(String newData, String intialData) {
		if (newData != intialData) {
			if (newData == null || intialData == null)
				return false;
			return newData.equals(intialData);
		}
		return true;
	}

	/**
	 * StringArray Compare Utility
	 * 
	 * @param newData
	 * @param intialData
	 * @return true / false
	 */
	public static boolean crunchifyCompare(String[] newData, String[] intialData) {
		if (newData.length != intialData.length)
			return false;
		Set&lt;String&gt; crunchifySet = new HashSet&lt;&gt;(Arrays.asList(intialData));
		for (String currentValue : newData)
			if (!crunchifySet.contains(currentValue))
				return false;
		return true;
	}

	/**
	 * IntegerArray Compare Utility
	 * 
	 * @param newData
	 * @param intialData
	 * @return true / false
	 */
	public static boolean crunchifyCompare(int[] newData, int[] intialData) {
		if (newData.length != intialData.length)
			return false;
		Set&lt;Integer&gt; crunchifySet = getCrunchifySet(intialData);
		for (int currentValue : newData)
			if (!crunchifySet.contains(currentValue))
				return false;
		return true;
	}

	public static Set&lt;Integer&gt; getCrunchifySet(int[] crunchifyData) {
		Set&lt;Integer&gt; crunchifySet = new HashSet&lt;&gt;();
		for (int data : crunchifyData)
			crunchifySet.add(data);
		return crunchifySet;
	}
}</pre><p></p>
<h4>Result:</h4>
<p></p><pre class="crayon-plain-tag">crunchifyCompare("Crunchify", "Crunchify"): true
crunchifyCompare("Yahoo", "Google"): false

crunchifyCompare(arr1, arr2): true
crunchifyCompare(arr1, arr3): false

crunchifyCompare(arr4, arr5): true
crunchifyCompare(arr4, arr6): false</pre><p>We will add more tutorials and compare utilities like two <a href="http://crunchify.com/how-to-use-gson-fromjson-to-convert-the-specified-json-into-an-object-of-the-specified-class/" target="_blank">JSON Object</a> Compares, two <a href="http://crunchify.com/how-to-read-convert-csv-comma-separated-values-file-to-arraylist-in-java-using-split-operation/" target="_blank">CSV file</a> compare, etc. So stay tuned.</p>
<p><code>NOTE:</code> some of the utilities are already available in <a href="http://crunchify.com/how-to-increase-tomcat-heapsize-jvm-heap-in-eclipse-ede/" target="_blank">Apache</a> <code>Commons IO</code> library. If you have hard <a href="http://crunchify.com/how-to-import-all-spring-mvc-dependencies-to-your-maven-project/" target="_blank">dependency</a> on NOT to include any third party library into your project then you could include above utility.</p>

<div class="ezAdsense adsense adsense-leadout" style="text-align:left;margin:0px;"><div style="margin-top:10px;margin-bottom: 20px;">

Have a suggestion on article? Please chime in and share it as a comment.

</div>

<div style="clear:both"></div></div>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/best-way-to-compare-string-arrays-int-arrays-and-strings-in-java-crunchifycompare-utility-for-your-project/">Best way to Compare String Arrays, Integer Arrays and Strings in Java &#8211; &#8220;CrunchifyCompare&#8221; Overloaded Utility for your Project</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/in-java8-how-to-convert-array-to-stream-using-arrays-stream-and-stream-of-operations/" rel="bookmark" title="In Java8 &#8211; How to Convert Array to Stream using Arrays.stream() and Stream.of() Operations">In Java8 &#8211; How to Convert Array to Stream using Arrays.stream() and Stream.of() Operations </a></li>
<li><a href="http://crunchify.com/java-program-to-replaceremove-characters-from-string/" rel="bookmark" title="Java Program to Replace/Remove Characters from String">Java Program to Replace/Remove Characters from String </a></li>
<li><a href="http://crunchify.com/how-to-implement-simple-circulararraylist-in-java/" rel="bookmark" title="How to Implement Simple CircularArrayList in Java?">How to Implement Simple CircularArrayList in Java? </a></li>
</ol>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Crunchify?a=i8bDHmDQs3o:D6oMGyAfkiQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Crunchify?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Crunchify/~4/i8bDHmDQs3o" height="1" width="1" alt=""/>]]></content:encoded>
			<wfw:commentRss>http://crunchify.com/best-way-to-compare-string-arrays-int-arrays-and-strings-in-java-crunchifycompare-utility-for-your-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://crunchify.com/best-way-to-compare-string-arrays-int-arrays-and-strings-in-java-crunchifycompare-utility-for-your-project/</feedburner:origLink></item>
		<item>
		<title>How to Deregister YARPP and Contact Form 7 CSS Style Sheet? WordPress Optimization Steps</title>
		<link>http://feedproxy.google.com/~r/Crunchify/~3/A--BHuIrr9Q/</link>
		<comments>http://crunchify.com/deregister-yarpp-contact-form-7-css-wordpress-optimization/#respond</comments>
		<pubDate>Sat, 11 Feb 2017 20:24:20 +0000</pubDate>
		<dc:creator><![CDATA[App Shah]]></dc:creator>
				<category><![CDATA[WordPress Plugins Tricks and Tweaks]]></category>
		<category><![CDATA[WordPress Tips, Tricks and Hacks]]></category>
		<category><![CDATA[Crunchify WordPress Optimization]]></category>
		<category><![CDATA[deregister contact form 7 scripts and styles]]></category>
		<category><![CDATA[disable contact form 7 css]]></category>
		<category><![CDATA[Stop loading Contact Form 7 CSS]]></category>
		<category><![CDATA[Stop Loading YARPP CSS]]></category>
		<category><![CDATA[Stop Loading YARPP JS files]]></category>
		<category><![CDATA[wordpress dequeue parent theme style]]></category>
		<category><![CDATA[wordpress dequeue plugin style]]></category>
		<category><![CDATA[wordpress dequeue script]]></category>
		<category><![CDATA[wp dequeue style]]></category>
		<category><![CDATA[wp dequeue style not working]]></category>
		<category><![CDATA[wp deregister script]]></category>
		<category><![CDATA[wp_deregister_style]]></category>
		<category><![CDATA[wpcf7_enqueue_scripts()]]></category>
		<category><![CDATA[wpcf7_enqueue_styles()]]></category>

		<guid isPermaLink="false">http://crunchify.com/?p=10382</guid>
		<description><![CDATA[<p>On Crunchify we have been always looking for better way to Optimization site. So far we have been published numerous articles related to how to stop loading below scripts and CSS files. Stop loading comment-reply.min.js, jquery-migrate.min.js and responsive-menu.js: article link Stop loading wp-embed.min.js: article link Stop loading jQuery and Crayon Syntax Highlighter CSS and Theme... <br /><a
class="more-link" href="http://crunchify.com/deregister-yarpp-contact-form-7-css-wordpress-optimization/">Read Article &#160; <i class="fa fa-chevron-circle-right" aria-hidden="true"></i></a></p>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/deregister-yarpp-contact-form-7-css-wordpress-optimization/">How to Deregister YARPP and Contact Form 7 CSS Style Sheet? WordPress Optimization Steps</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/how-to-stop-loading-unnecessary-files-and-reducing-websites-http-requests-wordpress-optimization-tips/" rel="bookmark" title="How to Stop Loading Unnecessary Files and Reducing Website&#8217;s HTTP Requests &#8211; WordPress Optimization Tips">How to Stop Loading Unnecessary Files and Reducing Website&#8217;s HTTP Requests &#8211; WordPress Optimization Tips </a></li>
<li><a href="http://crunchify.com/crayon-syntax-highlighter-wordpress-plugin-how-to-stop-loading-css-and-js-files/" rel="bookmark" title="Crayon Syntax Highlighter WordPress Plugin &#8211; How to Stop Loading 3 CSS and 1 JS files">Crayon Syntax Highlighter WordPress Plugin &#8211; How to Stop Loading 3 CSS and 1 JS files </a></li>
<li><a href="http://crunchify.com/gonzales-wordpress-plugin-remove-unwanted-css-and-js-loading-for-better-performance-goal/" rel="bookmark" title="Gonzales WordPress Plugin &#8211; Remove unwanted CSS and JS Loading for Better Performance Optimization Goal">Gonzales WordPress Plugin &#8211; Remove unwanted CSS and JS Loading for Better Performance Optimization Goal </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[
<div class="ezAdsense adsense adsense-leadin" style="text-align:center;margin:0px;"><div  style="margin-bottom:20px;margin-top:1px;">
<!-- Crunchify.Post.Top -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-4032710958875645"
     data-ad-slot="7425196307"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

</div>
<div style="clear:both"></div></div>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-YARPP-and-Contact-Form-7-CSS-Style-Sheets.png"><img class="alignnone size-full wp-image-10386" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-YARPP-and-Contact-Form-7-CSS-Style-Sheets.png" alt="" width="1900" height="650" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-YARPP-and-Contact-Form-7-CSS-Style-Sheets.png 1900w, http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-YARPP-and-Contact-Form-7-CSS-Style-Sheets-768x263.png 768w" sizes="(max-width: 1900px) 100vw, 1900px" /></a></p>
<p>On Crunchify we have been always looking for better way to <a href="http://crunchify.com/15-essential-settings-and-optimization-tasks-after-installing-wordpress/" target="_blank">Optimization</a> site. So far we have been published <code>numerous articles</code> related to how to stop loading below scripts and <a href="http://crunchify.com/how-to-add-blog-post-and-blog-page-ribbon-to-your-genesis-wordpress-framework-theme-here-is-a-simple-css-tricks/" target="_blank">CSS files</a>.</p>
<ul>
<li class="entry-title">Stop loading <code>comment-reply</code>.min.js, <code>jquery-migrate</code>.min.js and <code>responsive-menu</code>.js: <a href="http://crunchify.com/try-to-deregister-remove-comment-reply-min-js-jquery-migrate-min-js-and-responsive-menu-js-from-wordpress-if-not-required/" target="_blank">article link</a></li>
<li class="entry-title">Stop loading <code>wp-embed</code>.min.js: <a href="http://crunchify.com/how-to-disable-auto-embed-script-for-wordpress-4-4-wp-embed-min-js/" target="_blank">article link</a></li>
<li class="entry-title">Stop loading <a href="http://crunchify.com/how-to-refresh-div-content-without-reloading-page-using-jquery-and-ajax/" target="_blank">jQuery</a> and Crayon Syntax Highlighter CSS and Theme files: <a href="http://crunchify.com/crayon-syntax-highlighter-wordpress-plugin-how-to-stop-loading-css-and-js-files/" target="_blank">article link</a></li>
</ul>
<p>All of above tricks have been applied on Crunchify already. I would suggest you to go for each article and see if that applies to your WordPress site.</p>
<p>In this tutorial we will go over steps on <code>how to disable</code> and stop loading <code>Yet Another Related Post Plugin</code> (<a href="http://crunchify.com/wordpress-custom-post-type-cpt-tips-and-tricks-rss-yarpp-post-meta-footer-homepage/" target="_blank">YARPP</a>) and <code>Contact Form 7</code> CSS Style Sheets and it&#8217;s part of How To Deregister &amp; Dequeue Style Sheets tutorial.</p>
<p>Let&#8217;s take a look at below images:</p>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-YARPP-widget.css-file-Crunchify-Tips.png"><img class="alignnone size-large wp-image-10384" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-YARPP-widget.css-file-Crunchify-Tips.png" alt="" width="1884" height="124" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-YARPP-widget.css-file-Crunchify-Tips.png 1884w, http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-YARPP-widget.css-file-Crunchify-Tips-768x51.png 768w" sizes="(max-width: 1884px) 100vw, 1884px" /></a></p>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-YARPP-related.css-file-Crunchify-Tips.png"><img class="alignnone size-large wp-image-10385" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-YARPP-related.css-file-Crunchify-Tips.png" alt="" width="1914" height="120" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-YARPP-related.css-file-Crunchify-Tips.png 1914w, http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-YARPP-related.css-file-Crunchify-Tips-768x48.png 768w" sizes="(max-width: 1914px) 100vw, 1914px" /></a></p>
<p class="entry-title">Loading Contact Form 7 JavaScript and Stylesheet Only When it is Necessary.</p>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-Contact-Form-7-styles.css-file-Crunchify-Tips.png"><img class="alignnone size-full wp-image-10383" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-Contact-Form-7-styles.css-file-Crunchify-Tips.png" alt="" width="1888" height="124" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-Contact-Form-7-styles.css-file-Crunchify-Tips.png 1888w, http://cdn.crunchify.com/wp-content/uploads/2017/02/Deregister-Contact-Form-7-styles.css-file-Crunchify-Tips-768x50.png 768w" sizes="(max-width: 1888px) 100vw, 1888px" /></a></p>
<p>There is no reason you should load all above 3 files on each and every page. If required you could add those CSS file contents to your theme&#8217;s <a href="http://crunchify.com/how-to-print-all-loaded-java-scripts-and-css-stylesheets-handle-for-your-wordpress-blog/" target="_blank">style.css</a> file and that&#8217;s what I do usually.</p>
<p>In order to stop loading all above 3 CSS Style Sheets just add below code to your theme&#8217;s <a href="http://crunchify.com/how-to-show-hidden-features-in-wordpress-visual-editor/" target="_blank">functions.php</a> file.</p><pre class="crayon-plain-tag">// Dequeue yarpp Widgets CSS Style Sheet
add_action('wp_print_styles','crunchify_dequeue_header_styles');
function crunchify_dequeue_header_styles()
{
  wp_dequeue_style('yarppWidgetCss');
}

// Dequeue yarpp Related CSS Style Sheet
add_action('get_footer','crunchify_dequeue_footer_styles');
function crunchify_dequeue_footer_styles()
{
  wp_dequeue_style('yarppRelatedCss');
}

// Deregister Contact Form 7 CSS style sheet
add_action( 'wp_print_styles', 'crunchify_dequeue_contact_form7', 100 );
function crunchify_dequeue_contact_form7() {
    wp_deregister_style( 'contact-form-7' );
}</pre><p>And that&#8217;s it. Now all of above 3 files won&#8217;t be loaded next time when you load your site. There is one more way to stop loading JS and CSS file. Using <a href="http://crunchify.com/what-is-affiliate-cloaking-and-how-to-cloak-your-affiliate-link-without-wordpress-plugin/" target="_blank">WordPress</a> filter.</p><pre class="crayon-plain-tag">add_filter( 'wpcf7_load_js', '__return_false' );
add_filter( 'wpcf7_load_css', '__return_false' );</pre><p>Now what if you want to load some of those CSS content on site?</p>
<p>On Crunchify.com we have applied <a href="http://crunchify.com/how-to-automatically-display-titles-and-description-on-category-and-tag-archives-wordpress-webmaster-tips/" target="_blank">above tips</a> and we do have our custom CSS properties for YARPP. Just incase if you want to use then take a look below.</p><pre class="crayon-plain-tag">.yarpp-related {
    padding: 15px 20px 1px;
    border: 1px solid #dfdfdf;
    border-left: 2px solid #dd7127;
    font-size: small;
    margin-top: 30px;
    border-radius: 2px;
    text-transform: capitalize;
    box-shadow: 0 1px 4px rgba(0,0,0,.2), 0 0 40px rgba(0,0,0,.1) inset;
    background: #fff;
}

.yarpp-related ol&gt;li {
    margin-bottom: 12px;
}

.yarpp-related a {
    text-decoration: none!important;
    color: #444;
    font-size: 15px;
    font-weight: 400!important;
    line-height: 1.5;
}

.yarpp-related a:hover {
    color: #dd7127
}

.yarpp-related h3 {
    padding: 0 0 15px!important;
    font-size: 25px!important;
    margin: 0!important;
    font-weight: 700!important;
    font-family: "Lato","Helvetica Neue",Helvetica,Arial,sans-serif;
}</pre><p>Let me know if you have some other way to beautify YARPP section.</p>

<div class="ezAdsense adsense adsense-leadout" style="text-align:left;margin:0px;"><div style="margin-top:10px;margin-bottom: 20px;">

Have a suggestion on article? Please chime in and share it as a comment.

</div>

<div style="clear:both"></div></div>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/deregister-yarpp-contact-form-7-css-wordpress-optimization/">How to Deregister YARPP and Contact Form 7 CSS Style Sheet? WordPress Optimization Steps</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/how-to-stop-loading-unnecessary-files-and-reducing-websites-http-requests-wordpress-optimization-tips/" rel="bookmark" title="How to Stop Loading Unnecessary Files and Reducing Website&#8217;s HTTP Requests &#8211; WordPress Optimization Tips">How to Stop Loading Unnecessary Files and Reducing Website&#8217;s HTTP Requests &#8211; WordPress Optimization Tips </a></li>
<li><a href="http://crunchify.com/crayon-syntax-highlighter-wordpress-plugin-how-to-stop-loading-css-and-js-files/" rel="bookmark" title="Crayon Syntax Highlighter WordPress Plugin &#8211; How to Stop Loading 3 CSS and 1 JS files">Crayon Syntax Highlighter WordPress Plugin &#8211; How to Stop Loading 3 CSS and 1 JS files </a></li>
<li><a href="http://crunchify.com/gonzales-wordpress-plugin-remove-unwanted-css-and-js-loading-for-better-performance-goal/" rel="bookmark" title="Gonzales WordPress Plugin &#8211; Remove unwanted CSS and JS Loading for Better Performance Optimization Goal">Gonzales WordPress Plugin &#8211; Remove unwanted CSS and JS Loading for Better Performance Optimization Goal </a></li>
</ol>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Crunchify?a=A--BHuIrr9Q:E3lj937mVkQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Crunchify?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Crunchify/~4/A--BHuIrr9Q" height="1" width="1" alt=""/>]]></content:encoded>
			<wfw:commentRss>http://crunchify.com/deregister-yarpp-contact-form-7-css-wordpress-optimization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://crunchify.com/deregister-yarpp-contact-form-7-css-wordpress-optimization/</feedburner:origLink></item>
		<item>
		<title>Java Collections – hashCode() and equals() – How to Override equals() and hashcode() Method in Java?</title>
		<link>http://feedproxy.google.com/~r/Crunchify/~3/wu4Hg3blocI/</link>
		<comments>http://crunchify.com/how-to-override-equals-and-hashcode-method-in-java/#respond</comments>
		<pubDate>Mon, 06 Feb 2017 10:41:46 +0000</pubDate>
		<dc:creator><![CDATA[App Shah]]></dc:creator>
				<category><![CDATA[Core Java and J2EE Tutorials and Tips]]></category>
		<category><![CDATA[Eclipse IDE Tips and Tutorials]]></category>
		<category><![CDATA[Latest Technology News, Tips and Tricks]]></category>
		<category><![CDATA[Tips and Tricks on Niche Blogging]]></category>
		<category><![CDATA[difference between equals and hashcode in java]]></category>
		<category><![CDATA[equals and compare in java]]></category>
		<category><![CDATA[Equals and Hash Code]]></category>
		<category><![CDATA[hashcode and equals contract]]></category>
		<category><![CDATA[hashcode and equals in java interview questions]]></category>
		<category><![CDATA[HashCode and Equals method in Java object]]></category>
		<category><![CDATA[hashcode implementation in java]]></category>
		<category><![CDATA[hashcode in java example]]></category>
		<category><![CDATA[Immutable Object]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java collection]]></category>
		<category><![CDATA[java equals]]></category>
		<category><![CDATA[java equals and hashcode]]></category>
		<category><![CDATA[java hashcode]]></category>
		<category><![CDATA[Logical equality in Java]]></category>
		<category><![CDATA[override equals]]></category>
		<category><![CDATA[override hashcode]]></category>
		<category><![CDATA[Overriding equals and hashCode in Java]]></category>
		<category><![CDATA[Reference equality in java]]></category>
		<category><![CDATA[what is the use of hashcode in java]]></category>
		<category><![CDATA[why we need to override equals and hashcode in java]]></category>

		<guid isPermaLink="false">http://crunchify.com/?p=5353</guid>
		<description><![CDATA[<p>equals() and hashCode() in Java are two fundamental method which is declared in Object class and part or core Java library. If you have any one of below concerns in Java then you are at right place. Java Practices -&#62; Implementing equals override &#8211; Overriding equals and hashCode in Java How to override equals() method in... <br /><a
class="more-link" href="http://crunchify.com/how-to-override-equals-and-hashcode-method-in-java/">Read Article &#160; <i class="fa fa-chevron-circle-right" aria-hidden="true"></i></a></p>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/how-to-override-equals-and-hashcode-method-in-java/">Java Collections &#8211; hashCode() and equals() &#8211; How to Override equals() and hashcode() Method in Java?</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/best-way-to-compare-if-two-arrays-are-equal/" rel="bookmark" title="Best Way to Compare if Two Arrays are Equal">Best Way to Compare if Two Arrays are Equal </a></li>
<li><a href="http://crunchify.com/java-method-overriding-examples-and-concepts-overriding-rules/" rel="bookmark" title="Java Method Overriding Examples and Concepts: Overriding Rules">Java Method Overriding Examples and Concepts: Overriding Rules </a></li>
<li><a href="http://crunchify.com/in-java-what-is-a-difference-between-identityhashmap-and-hashmap-performance-comparision/" rel="bookmark" title="In Java What is a Difference Between IdentityHashMap and HashMap + Performance Comparison">In Java What is a Difference Between IdentityHashMap and HashMap + Performance Comparison </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[
<div class="ezAdsense adsense adsense-leadin" style="text-align:center;margin:0px;"><div  style="margin-bottom:20px;margin-top:1px;">
<!-- Crunchify.Post.Top -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-4032710958875645"
     data-ad-slot="7425196307"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

</div>
<div style="clear:both"></div></div>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2013/06/Java-Collections-hashCode-and-equals-How-to-Override-equals-and-hashcode-Method-in-Java.png"><img class="alignnone size-full wp-image-10380" src="http://cdn.crunchify.com/wp-content/uploads/2013/06/Java-Collections-hashCode-and-equals-How-to-Override-equals-and-hashcode-Method-in-Java.png" alt="" width="1358" height="680" srcset="http://cdn.crunchify.com/wp-content/uploads/2013/06/Java-Collections-hashCode-and-equals-How-to-Override-equals-and-hashcode-Method-in-Java.png 1358w, http://cdn.crunchify.com/wp-content/uploads/2013/06/Java-Collections-hashCode-and-equals-How-to-Override-equals-and-hashcode-Method-in-Java-768x385.png 768w" sizes="(max-width: 1358px) 100vw, 1358px" /></a></p>
<p><code>equals()</code> and <code>hashCode()</code> in <a href="http://crunchify.com/how-to-use-expiringmap-maven-java-utility-to-remove-expired-objects-from-map-automatically-complete-java-tutorial/" target="_blank">Java</a> are two fundamental method which is declared in <a href="http://crunchify.com/create-simple-pojo-and-multiple-java-reflection-examples/" target="_blank">Object class</a> and part or core Java <a href="http://crunchify.com/mac-os-x-tips-how-to-show-hide-hidden-files-in-finder-window/" target="_blank">library</a>.</p>
<p>If you have any one of below concerns in Java then you are at right place.</p>
<ul>
<li>Java Practices -&gt; Implementing equals</li>
<li>override &#8211; <a href="http://crunchify.com/java-method-overriding-examples-and-concepts-overriding-rules/" target="_blank">Overriding</a> equals and hashCode in Java</li>
<li>How to override equals() method in java</li>
<li>How to override hashCode() method in java</li>
<li>How to override equals and <a href="http://crunchify.com/how-to-create-a-simple-in-memory-cache-in-java-lightweight-cache/" target="_blank">hashCode</a> method in Java</li>
<li>How and Why to Override the equals Method in <a href="http://crunchify.com/category/java-web-development-tutorial/" target="_blank">Java</a></li>
<li>Why always override hashcode() if overriding equals()?</li>
</ul>
<p>Let&#8217;s take a look at simple example to understand first <code>Reference Equality</code> and <code>Logical Equality</code>. The equality operator (==) <a href="http://crunchify.com/in-java-what-is-a-difference-between-identityhashmap-and-hashmap-performance-comparision/" target="_blank">compares</a> the references (addresses in memory) of the <a href="http://crunchify.com/java-union-of-two-arrays-using-primitive-data-types-dont-use-java-collection/" target="_blank">two Strings</a> as two different numbers &#8211; this is known as <code>Reference equality</code>.</p>
<p><code>Logical equality</code> compares the data of the objects instead of the value of the <a href="http://crunchify.com/a-simple-singly-linked-list-implementation-in-java/" target="_blank">references</a>.</p><pre class="crayon-plain-tag">package com.crunchify.tutorials;

/**
 * @author Crunchify.com
 */

public class CrunchifyLogicalVsReferenceEqality {

    public static void main(String[] args) {
        String strA = new String("eBay");
        String strB = new String("eBay");
        String strC = new String("Paypal");

        // Create a String reference and assign an existing String's reference to it
        // so that both references point to the same String object in memory.
        String strD = strA;

        // Print out the results of various equality checks
        // Reference Equality
        System.out.println("Reference Equality Result:");
        System.out.println(strA == strB);
        System.out.println(strA == strC);
        System.out.println(strA == strD);

        // Logical Equality
        System.out.println("\nLogical Equality Result:");
        System.out.println(strA.equals(strB));
        System.out.println(strA.equals(strC));
        System.out.println(strA.equals(strD));

    }
}</pre><p>Output:</p><pre class="crayon-plain-tag">Reference Equality Result:
false
false
true

Logical Equality Result:
true
false
true</pre><p></p>
<h3><tt>hashCode</tt> and <tt>equals</tt> are closely related :</h3>
<ul>
<li>if you override <tt>equals</tt>, you must <a href="http://crunchify.com/in-java-how-to-perform-file-search-operation-using-java-nio-file-interface-tutorial-on-file-and-directory-operations/" target="_blank">override</a> <tt>hashCode</tt>.</li>
<li><tt>hashCode</tt> must generate equal values for equal objects.</li>
<li><tt>equals</tt> and <tt>hashCode</tt> must depend on the <code>same set of significant fields</code>. You must use the same set of fields in both of these <a href="http://crunchify.com/in-java-8-how-to-iterate-through-java-util-map-and-java-util-list-example-attached-with-total-5-different-ways/" target="_blank">methods</a>. You are not required to use all fields. For example, a calculated field that depends on others should very likely be omitted from <tt><code>equals</code></tt> and <tt><code>hashCode</code></tt>.</li>
</ul>
<h3>When implementing <tt>equals</tt>, fields are compared differently, according to their type:</h3>
<ul>
<li>object fields, including <a href="http://crunchify.com/java-concurrentnavigablemap-and-concurrentskiplistmap-example-with-all-details/" target="_blank">collections</a> : use <tt>equals</tt></li>
<li>type-safe enumerations : use either <tt>equals</tt> or <tt>==</tt> (they amount to the same thing, in this case)</li>
<li>possibly-null object fields : use both <tt>==</tt> and <tt>equals</tt></li>
<li>array fields : use <tt><code>Arrays.equals</code></tt></li>
<li><a href="http://crunchify.com/create-simple-pojo-and-multiple-java-reflection-examples/" target="_blank">primitive fields</a> other than <tt>float</tt> or <tt>double</tt> : use <tt>==</tt></li>
<li><tt><code>float</code></tt> : convert to <tt>int</tt> using <tt></tt><code><tt>Float.floatToIntBits</tt>,</code> then use <tt>==</tt></li>
<li><tt><code>double</code></tt> :  <a href="http://crunchify.com/in-java8-how-to-convert-array-to-stream-using-arrays-stream-and-stream-of-operations/" target="_blank">convert</a> to <tt>long</tt> using <tt><code>Double.doubleToLongBits</code></tt>, then use <tt>==</tt></li>
</ul>
<h3>Implementing <tt>hashCode</tt> :</h3>
<ul>
<li>if a class overrides <tt>equals</tt>, it must override <tt>hashCode</tt></li>
<li>when they are both overridden, <tt>equals</tt> and <tt>hashCode</tt> must use the same set of <a href="http://crunchify.com/java-saving-and-loading-data-from-a-file-simple-production-ready-utility-for-file-readwrite-operation/" target="_blank">fields</a></li>
<li>if two objects are equal, then their <tt>hashCode</tt> values must be equal as well</li>
<li>if the object is <a href="http://crunchify.com/java-program-to-replaceremove-characters-from-string/" target="_blank">immutable</a>, then <tt>hashCode</tt> is a candidate for caching and <a href="http://crunchify.com/lazy-creation-of-singleton-threadsafe-instance-without-using-synchronized-keyword/" target="_blank">lazy initialization</a></li>
</ul>
<p>It is a popular misconception that <tt>hashCode</tt> provides a unique identifier for an object. It does not.</p>
<p>By general contract, the <code>equals()</code> method in Java must be reflexive, symmetric, transitive, <a href="http://crunchify.com/java-union-of-two-arrays-using-java-collection-class/" target="_blank">consistent</a>, and any non-null <a href="http://crunchify.com/have-you-noticed-nullpointerexception-npe-there-are-few-best-practices-to-avoid-npe/" target="_blank">reference</a> must return false. In other words, for arbitrary values of a, b, and c, the following tests must always pass:</p><pre class="crayon-plain-tag">/ reflexive property
 assertTrue( a.equals(a) );

 // symmetric property
 assertTrue( a.equals(b) == b.equals(a) );

 // transitive property
 if ( a.equals(b) &amp;&amp; b.equals(c) ) {
   assertTrue( a.equals(c) );
 }

 // consistency property
 assertTrue( a.equals(b) == a.equals(b) );

 // non-null property
 assertFalse( a.equals(null) );</pre><p>For the Best practice use below steps to implement your equals() method:</p>
<ul>
<li>Use this == that to check reference equality</li>
<li>Use <a href="http://crunchify.com/what-is-java-collections-framework-benefits-of-collections-framework/" target="_blank">instanceof</a> to test for correct argument type</li>
<li>Cast the argument to the correct type</li>
<li>Compare significant fields for equality</li>
</ul>
<p><strong>Complete Example:</strong></p><pre class="crayon-plain-tag">package com.crunchify.tutorials;

/**
 * @author Crunchify.com
 */

public class CrunchifyImplementEqualsHashCode {

    public static void main(String[] args) {

        CrunchifyImplementEqualsHashCode crunchifyTest = new CrunchifyImplementEqualsHashCode();
        Crunchify one = new Crunchify(1);
        Crunchify two = new Crunchify(1);
        crunchifyTest.test1(one, two);

        Crunchify three = new Crunchify(1);
        Crunchify four = new Crunchify(2);
        crunchifyTest.test2(three, four);
    }

    public void test1(Crunchify one, Crunchify two) {
        if (one.equals(two)) {
            System.out.println("Test1: One and Two are equal");
        } else {
            System.out.println("Test1: One and Two are not equal");
        }
    }

    public void test2(Crunchify three, Crunchify four) {
        if (three.equals(four)) {
            System.out.println("Test2: Three and Four are equal");
        } else {
            System.out.println("Test2: Three and Four are not equal");
        }
    }
}

class Crunchify {
    private int value;

    Crunchify(int val) {
        value = val;
    }

    public int getValue() {
        return value;
    }

    @Override
    public boolean equals(Object o) {
        if ((o instanceof Crunchify) &amp;&amp; (((Crunchify) o).getValue() == this.value)) {
            return true;
        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        int result = 0;
        result = (int) (value / 11);
        return result;
    }
}</pre><p><a href="http://crunchify.com/missing-maven-settings-xml-file-for-your-eclipse-what-if-you-need-two-settings-xml-file-for-work-personal-workspace/" target="_blank">Eclipse</a> Console Output:</p><pre class="crayon-plain-tag">Test1: One and Two are equal
Test2: Three and Four are not equal</pre><p></p>

<div class="ezAdsense adsense adsense-leadout" style="text-align:left;margin:0px;"><div style="margin-top:10px;margin-bottom: 20px;">

Have a suggestion on article? Please chime in and share it as a comment.

</div>

<div style="clear:both"></div></div>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/how-to-override-equals-and-hashcode-method-in-java/">Java Collections &#8211; hashCode() and equals() &#8211; How to Override equals() and hashcode() Method in Java?</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/best-way-to-compare-if-two-arrays-are-equal/" rel="bookmark" title="Best Way to Compare if Two Arrays are Equal">Best Way to Compare if Two Arrays are Equal </a></li>
<li><a href="http://crunchify.com/java-method-overriding-examples-and-concepts-overriding-rules/" rel="bookmark" title="Java Method Overriding Examples and Concepts: Overriding Rules">Java Method Overriding Examples and Concepts: Overriding Rules </a></li>
<li><a href="http://crunchify.com/in-java-what-is-a-difference-between-identityhashmap-and-hashmap-performance-comparision/" rel="bookmark" title="In Java What is a Difference Between IdentityHashMap and HashMap + Performance Comparison">In Java What is a Difference Between IdentityHashMap and HashMap + Performance Comparison </a></li>
</ol>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Crunchify?a=wu4Hg3blocI:JgwpFaqev7I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Crunchify?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Crunchify/~4/wu4Hg3blocI" height="1" width="1" alt=""/>]]></content:encoded>
			<wfw:commentRss>http://crunchify.com/how-to-override-equals-and-hashcode-method-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://crunchify.com/how-to-override-equals-and-hashcode-method-in-java/</feedburner:origLink></item>
		<item>
		<title>Gonzales WordPress Plugin – Remove unwanted CSS and JS Loading for Better Performance Optimization Goal</title>
		<link>http://feedproxy.google.com/~r/Crunchify/~3/QFo4EvrWP4U/</link>
		<comments>http://crunchify.com/gonzales-wordpress-plugin-remove-unwanted-css-and-js-loading-for-better-performance-goal/#respond</comments>
		<pubDate>Sun, 05 Feb 2017 18:40:20 +0000</pubDate>
		<dc:creator><![CDATA[App Shah]]></dc:creator>
				<category><![CDATA[Sponsored Post]]></category>
		<category><![CDATA[WordPress Plugins Tricks and Tweaks]]></category>
		<category><![CDATA[Gonzales WordPress Plugin]]></category>
		<category><![CDATA[JavaScript and CSS WordPress Tips]]></category>
		<category><![CDATA[WordPress Speed Optimization Goal]]></category>

		<guid isPermaLink="false">http://crunchify.com/?p=10366</guid>
		<description><![CDATA[<p>On Crunchify, we have published number of different WordPress Optimization articles. Speed Optimization is one of our goal at Crunchify and we would do anything to optimize site speed. Faster site loading will not only increase Google SERP score but also it will improve user experience. Gonzales WordPress Plugin is one of the best plugin I have... <br /><a
class="more-link" href="http://crunchify.com/gonzales-wordpress-plugin-remove-unwanted-css-and-js-loading-for-better-performance-goal/">Read Article &#160; <i class="fa fa-chevron-circle-right" aria-hidden="true"></i></a></p>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/gonzales-wordpress-plugin-remove-unwanted-css-and-js-loading-for-better-performance-goal/">Gonzales WordPress Plugin &#8211; Remove unwanted CSS and JS Loading for Better Performance Optimization Goal</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/not-using-emoji-on-your-wordpress-blog-stop-loading-wp-emoji-release-min-js-and-css-file/" rel="bookmark" title="Not using Emoji on your WordPress Blog? Stop Loading wp-emoji-release.min.js and CSS file">Not using Emoji on your WordPress Blog? Stop Loading wp-emoji-release.min.js and CSS file </a></li>
<li><a href="http://crunchify.com/how-to-stop-loading-woocommerce-js-javascript-and-css-files-on-all-wordpress-postspages/" rel="bookmark" title="How to Stop Loading WooCommerce .js (javascript) and .css files on all WordPress Posts/Pages?">How to Stop Loading WooCommerce .js (javascript) and .css files on all WordPress Posts/Pages? </a></li>
<li><a href="http://crunchify.com/better-wordpress-minify-one-of-the-best-wordpress-minify-plugin/" rel="bookmark" title="Better WordPress Minify: One of the Best WordPress Minify Plugin">Better WordPress Minify: One of the Best WordPress Minify Plugin </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[
<div class="ezAdsense adsense adsense-leadin" style="text-align:center;margin:0px;"><div  style="margin-bottom:20px;margin-top:1px;">
<!-- Crunchify.Post.Top -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-4032710958875645"
     data-ad-slot="7425196307"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

</div>
<div style="clear:both"></div></div>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/Gonzales-WordPress-Plugin-to-Speed-Up-WordPress-Crunchify-Tutorial.png"><img class="alignnone size-full wp-image-10369" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/Gonzales-WordPress-Plugin-to-Speed-Up-WordPress-Crunchify-Tutorial.png" alt="" width="750" height="331" /></a></p>
<p>On Crunchify, we have published number of different <a href="http://crunchify.com/noticed-higher-cpu-memory-usage-for-wp-site-wordpress-optimization-guide-htaccess-tricks-disqus-problem/" target="_blank">WordPress Optimization</a> articles. Speed Optimization is one of our goal at Crunchify and we would do anything to optimize <a href="http://crunchify.com/how-to-create-social-sharing-button-without-any-plugin-and-script-loading-wordpress-speed-optimization-goal/" target="_blank">site speed</a>. Faster site loading will not only increase <a href="http://crunchify.com/how-to-add-rich-snippets-for-reviews-and-ratings-without-any-plugin-google-structured-schema-org-markup/" target="_blank">Google SERP</a> score but also it will improve user experience.</p>
<p><code>Gonzales WordPress Plugin</code> is one of the best plugin I have used on Crunchify as it provides nice UI based options to WordPress admins to disable <code>unwanted CSS and JS files</code> on specific page or posts.</p>
<p>Let&#8217;s take a look at simple example. <a href="http://crunchify.com/how-to-use-google-forms-as-a-wordpress-contact-form-why-to-pay-for-monthlyyearly-fee/" target="_blank">Contact Form</a> 7 is THE best plugin out there but it adds CSS and JS files on <code>all</code> of your WordPress pages and posts. You absolutely don&#8217;t need them except <a href="http://crunchify.com/how-to-modify-404-page-not-found-template-for-wordpress-genesis-framework-theme/" target="_blank">Contact Page</a>.</p>
<p>Gonzales plugin provides very easy UI options to disable specific JS and CSS files on different page or posts.</p>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/Disable-Unwanted-JavaScript-and-CSS-file-loadig-on-WordPress-Page-and-Posts.png"><img class="alignnone size-full wp-image-10367" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/Disable-Unwanted-JavaScript-and-CSS-file-loadig-on-WordPress-Page-and-Posts.png" alt="" width="1446" height="1180" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/Disable-Unwanted-JavaScript-and-CSS-file-loadig-on-WordPress-Page-and-Posts.png 1446w, http://cdn.crunchify.com/wp-content/uploads/2017/02/Disable-Unwanted-JavaScript-and-CSS-file-loadig-on-WordPress-Page-and-Posts-768x627.png 768w" sizes="(max-width: 1446px) 100vw, 1446px" /></a></p>
<p>As you could see in above image, plugin provides <code>nice UI Options</code> to disable specific JS and CSS files on specific pages.</p>
<h3>Let&#8217;s get started on Gonzales WordPress Plugin:</h3>
<h3>Step-1</h3>
<p>Download plugin from official site: <a href="https://tomasz-dobrzynski.com/wordpress-gonzales" target="_blank" rel="nofollow">https://tomasz-dobrzynski.com/wordpress-gonzales</a>. Single site license <code>costs $29</code> as you see in below image.</p>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/Gonzales-Plugin-price-29.png"><img class="alignnone wp-image-10370" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/Gonzales-Plugin-price-29.png" alt="" width="550" height="155" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/Gonzales-Plugin-price-29.png 804w, http://cdn.crunchify.com/wp-content/uploads/2017/02/Gonzales-Plugin-price-29-768x216.png 768w" sizes="(max-width: 550px) 100vw, 550px" /></a></p>
<p>You will be redirected to paypal for payment options. Once done, you will be able to <a href="http://crunchify.com/how-about-backing-up-full-wordpress-site-to-dropbox-ofcourse-using-wordpress-backup-to-dropbox-plugin/" target="_blank">download plugin</a> binary.</p>
<h3>Step-2</h3>
<p>Go to <a href="http://crunchify.com/wordpress-contact-form-plugins-google-form-favorite/" target="_blank">WordPress Admin</a> Panel and install it.</p>
<h3>Step-3</h3>
<p>Plugin add Gonzales Option into <code>Site Toolbar</code>. It&#8217;s absolutely required to enable Toolbar while setting up plugin.</p>
<p>Go to <code>Users</code> -&gt; <code>Your Profile</code> to enable Toolbar.</p>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/Enable-Toolbar-for-Gonzales-Plugin.png"><img class="alignnone size-full wp-image-10371" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/Enable-Toolbar-for-Gonzales-Plugin.png" alt="" width="1042" height="158" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/Enable-Toolbar-for-Gonzales-Plugin.png 1042w, http://cdn.crunchify.com/wp-content/uploads/2017/02/Enable-Toolbar-for-Gonzales-Plugin-768x116.png 768w" sizes="(max-width: 1042px) 100vw, 1042px" /></a></p>
<h3>Step-4</h3>
<p>There is no special <a href="http://crunchify.com/wordpress-and-amp-accelerated-mobile-pages-all-in-one-customization-for-analytics-adsense-social-media-guide-for-beginner/" target="_blank">setting page</a> will be added. Instead go to your site and look at <code>Toolbar</code>.</p>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/Gonzales-Toolbar-Menu.png"><img class="alignnone size-full wp-image-10372" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/Gonzales-Toolbar-Menu.png" alt="" width="1270" height="80" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/Gonzales-Toolbar-Menu.png 1270w, http://cdn.crunchify.com/wp-content/uploads/2017/02/Gonzales-Toolbar-Menu-768x48.png 768w" sizes="(max-width: 1270px) 100vw, 1270px" /></a></p>
<p>Click on Gonzales Menu link and you will see inline page popup with list of loaded JS and CSS files.</p>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/More-CSS-and-JS-files-loaded-on-Crunchify.com-Site.png"><img class="alignnone size-full wp-image-10373" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/More-CSS-and-JS-files-loaded-on-Crunchify.com-Site.png" alt="" width="1446" height="966" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/More-CSS-and-JS-files-loaded-on-Crunchify.com-Site.png 1446w, http://cdn.crunchify.com/wp-content/uploads/2017/02/More-CSS-and-JS-files-loaded-on-Crunchify.com-Site-768x513.png 768w" sizes="(max-width: 1446px) 100vw, 1446px" /></a></p>
<p>And that&#8217;s it. Take your time and choose which JS and CSS files you need on Pages or Posts. Disable which all are not required for your need.</p>
<p>Now Plugin will do all the magic and all unwanted <a href="http://crunchify.com/create-new-cool-previous-next-navigation-button-for-wordpress-blog/" target="_blank">JavaScript</a> and <a href="http://crunchify.com/how-to-apply-css-only-on-home-archive-page-or-custom-post-type-wordpress-tips-and-tricks/" target="_blank">CSS</a> files won&#8217;t be loaded.</p>
<p>Plugin is very nicely written by Tomasz. It&#8217;s very simple without any complex logic. Plugin adds two <a href="http://crunchify.com/woocommerce-adds-thousands-of-_transient_-entries-into-wp_options-table-how-to-delete-and-disable-all-geoip-transient-settings/" target="_blank">Database Tables</a> once you save settings.</p>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/Plugin-addes-2-Database-Tables-Crunchify.png"><img class="alignnone size-full wp-image-10374" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/Plugin-addes-2-Database-Tables-Crunchify.png" alt="" width="1854" height="150" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/Plugin-addes-2-Database-Tables-Crunchify.png 1854w, http://cdn.crunchify.com/wp-content/uploads/2017/02/Plugin-addes-2-Database-Tables-Crunchify-768x62.png 768w" sizes="(max-width: 1854px) 100vw, 1854px" /></a></p>
<h3>How to verify it&#8217;s working?</h3>
<h4>Before enabling Gonzales WordPress Plugin</h4>
<p>As you see in below image, there are total <code>19 JS and CSS files loaded on site</code>. This was absolutely not required in my case.</p>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/Before-Gonzales-Plugin-Enabled-Crunchify-Tips.png"><img class="alignnone size-full wp-image-10375" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/Before-Gonzales-Plugin-Enabled-Crunchify-Tips.png" alt="" width="852" height="428" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/Before-Gonzales-Plugin-Enabled-Crunchify-Tips.png 852w, http://cdn.crunchify.com/wp-content/uploads/2017/02/Before-Gonzales-Plugin-Enabled-Crunchify-Tips-768x386.png 768w" sizes="(max-width: 852px) 100vw, 852px" /></a></p>
<h4>After enabling Gonzales WordPress Plugin</h4>
<p>After enabling plugin, now only <code>9 JS and CSS</code> files are loading on site <img src="https://s.w.org/images/core/emoji/2.2.1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/After-Gonzales-Plugin-Enabled-Crunchify-Tips.png"><img class="alignnone size-full wp-image-10376" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/After-Gonzales-Plugin-Enabled-Crunchify-Tips.png" alt="" width="886" height="428" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/After-Gonzales-Plugin-Enabled-Crunchify-Tips.png 886w, http://cdn.crunchify.com/wp-content/uploads/2017/02/After-Gonzales-Plugin-Enabled-Crunchify-Tips-768x371.png 768w" sizes="(max-width: 886px) 100vw, 886px" /></a></p>
<p>Currently it&#8217;s not supporting <a href="http://crunchify.com/5-useful-tricks-to-speed-up-wordpress-boost-performance/" target="_blank">minify option</a> for JS and CSS but it would be nice to have feature in the future Gonzales Release.</p>
<p>On Crunchify, we have already performed so many customization using <a href="http://crunchify.com/https-everywhere-on-crunchify-com-handy-checklist-and-complete-guide-moving-over-to-https/" target="_blank">functions.php</a> file.</p><pre class="crayon-plain-tag">// Dequeue yarpp styles..
add_action('wp_print_styles', 'crunchify_dequeue_header_styles');
function crunchify_dequeue_header_styles()
{
	wp_dequeue_style('yarppWidgetCss');
}

add_action('get_footer', 'crunchify_dequeue_footer_styles');
function crunchify_dequeue_footer_styles()
{
	wp_dequeue_style('yarppRelatedCss');
}

// Remove jquery
add_action('init', 'crunchify_clean_header_hook');
function crunchify_clean_header_hook()
{
	wp_deregister_script('comment-reply');
	if (!is_admin()) {
		wp_deregister_script('jquery');
	}
}

// * Enqueue scripts and styles
add_action('wp_enqueue_scripts', 'crunchify_dequeue_scripts_styles');
function crunchify_dequeue_scripts_styles()
{
	wp_deregister_style('crayon-font-consolas');
	wp_deregister_style('crayon-theme-neon');
	wp_deregister_script('wp-embed');
}</pre><p>Now with Gonzales Plugin, I don&#8217;t have to perform all of these <a href="http://crunchify.com/how-to-setup-discourse-org-forum-on-linode-correct-way-tested-and-verified-steps/" target="_blank">customization</a> using functions.php file but with simple UI. Happy blogging.</p>

<div class="ezAdsense adsense adsense-leadout" style="text-align:left;margin:0px;"><div style="margin-top:10px;margin-bottom: 20px;">

Have a suggestion on article? Please chime in and share it as a comment.

</div>

<div style="clear:both"></div></div>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/gonzales-wordpress-plugin-remove-unwanted-css-and-js-loading-for-better-performance-goal/">Gonzales WordPress Plugin &#8211; Remove unwanted CSS and JS Loading for Better Performance Optimization Goal</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/not-using-emoji-on-your-wordpress-blog-stop-loading-wp-emoji-release-min-js-and-css-file/" rel="bookmark" title="Not using Emoji on your WordPress Blog? Stop Loading wp-emoji-release.min.js and CSS file">Not using Emoji on your WordPress Blog? Stop Loading wp-emoji-release.min.js and CSS file </a></li>
<li><a href="http://crunchify.com/how-to-stop-loading-woocommerce-js-javascript-and-css-files-on-all-wordpress-postspages/" rel="bookmark" title="How to Stop Loading WooCommerce .js (javascript) and .css files on all WordPress Posts/Pages?">How to Stop Loading WooCommerce .js (javascript) and .css files on all WordPress Posts/Pages? </a></li>
<li><a href="http://crunchify.com/better-wordpress-minify-one-of-the-best-wordpress-minify-plugin/" rel="bookmark" title="Better WordPress Minify: One of the Best WordPress Minify Plugin">Better WordPress Minify: One of the Best WordPress Minify Plugin </a></li>
</ol>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Crunchify?a=QFo4EvrWP4U:BJgzFpvg2iQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Crunchify?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Crunchify/~4/QFo4EvrWP4U" height="1" width="1" alt=""/>]]></content:encoded>
			<wfw:commentRss>http://crunchify.com/gonzales-wordpress-plugin-remove-unwanted-css-and-js-loading-for-better-performance-goal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://crunchify.com/gonzales-wordpress-plugin-remove-unwanted-css-and-js-loading-for-better-performance-goal/</feedburner:origLink></item>
		<item>
		<title>How to use Gson -&gt; fromJson() to convert the specified JSON into an Object of the Specified Class</title>
		<link>http://feedproxy.google.com/~r/Crunchify/~3/PwbGaSavWmE/</link>
		<comments>http://crunchify.com/how-to-use-gson-fromjson-to-convert-the-specified-json-into-an-object-of-the-specified-class/#respond</comments>
		<pubDate>Sat, 04 Feb 2017 16:09:51 +0000</pubDate>
		<dc:creator><![CDATA[App Shah]]></dc:creator>
				<category><![CDATA[JSON Tutorials and Examples]]></category>
		<category><![CDATA[Top Google Product News]]></category>
		<category><![CDATA[com.google.code.gson maven dependency]]></category>
		<category><![CDATA[Getting Started with Google GSON]]></category>
		<category><![CDATA[Google GSON]]></category>
		<category><![CDATA[google gson example java]]></category>
		<category><![CDATA[gson 2.8.0 maven dependency]]></category>
		<category><![CDATA[gson annotations]]></category>
		<category><![CDATA[gson example]]></category>
		<category><![CDATA[gson javadoc]]></category>
		<category><![CDATA[gson maven dependency]]></category>
		<category><![CDATA[gson parse json]]></category>
		<category><![CDATA[gson string to json]]></category>
		<category><![CDATA[Gson User Guide]]></category>
		<category><![CDATA[gson vs json]]></category>
		<category><![CDATA[Java Gson + JSON Tutorial]]></category>
		<category><![CDATA[JSON parsing using Gson for Java]]></category>
		<category><![CDATA[Simple GSON Example]]></category>

		<guid isPermaLink="false">http://crunchify.com/?p=10363</guid>
		<description><![CDATA[<p>As many of you know already Gson is a great Java library that can be used to convert Java Objects into their JSON representation. It works also in reverse order deserializing the specified JSONObject or JSONArray into an object of the specified class. How to convert Java object to / from JSON (Gson)? In this tutorial... <br /><a
class="more-link" href="http://crunchify.com/how-to-use-gson-fromjson-to-convert-the-specified-json-into-an-object-of-the-specified-class/">Read Article &#160; <i class="fa fa-chevron-circle-right" aria-hidden="true"></i></a></p>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/how-to-use-gson-fromjson-to-convert-the-specified-json-into-an-object-of-the-specified-class/">How to use Gson -> fromJson() to convert the specified JSON into an Object of the Specified Class</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/java-how-to-parse-jsonobject-and-jsonarrays/" rel="bookmark" title="Java: How to Parse JSONObject and JSONArrays &#8211; Beginner&#8217;s Guide">Java: How to Parse JSONObject and JSONArrays &#8211; Beginner&#8217;s Guide </a></li>
<li><a href="http://crunchify.com/complete-end-to-end-java-tutorial-with-singleton-object-employee-crunchify-object-pojo-detailed-testcase/" rel="bookmark" title="Complete End to End Java Tutorial with Singleton Object Employee, Crunchify Java POJO and Detailed TestCase">Complete End to End Java Tutorial with Singleton Object Employee, Crunchify Java POJO and Detailed TestCase </a></li>
<li><a href="http://crunchify.com/in-java-how-to-flatten-or-unflatten-complex-json-objects-into-flat-map-like-structure/" rel="bookmark" title="In Java How to Flatten or Unflatten Complex JSON objects into Flat &#038; Map-Like Structure">In Java How to Flatten or Unflatten Complex JSON objects into Flat &#038; Map-Like Structure </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[
<div class="ezAdsense adsense adsense-leadin" style="text-align:center;margin:0px;"><div  style="margin-bottom:20px;margin-top:1px;">
<!-- Crunchify.Post.Top -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-4032710958875645"
     data-ad-slot="7425196307"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

</div>
<div style="clear:both"></div></div>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/Gsons-fromJson-to-deserializes-the-specified-Json-into-an-object-of-the-specified-class.png"><img class="alignnone size-full wp-image-10364" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/Gsons-fromJson-to-deserializes-the-specified-Json-into-an-object-of-the-specified-class.png" alt="" width="1326" height="584" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/Gsons-fromJson-to-deserializes-the-specified-Json-into-an-object-of-the-specified-class.png 1326w, http://cdn.crunchify.com/wp-content/uploads/2017/02/Gsons-fromJson-to-deserializes-the-specified-Json-into-an-object-of-the-specified-class-768x338.png 768w" sizes="(max-width: 1326px) 100vw, 1326px" /></a></p>
<p>As many of you know already Gson is a great <a href="http://crunchify.com/java-nio-non-blocking-io-with-server-client-example-java-nio-bytebuffer-and-channels-selector-java-nio-vs-io/" target="_blank">Java library</a> that can be used to convert <a href="http://crunchify.com/how-to-serialize-deserialize-list-of-objects-in-java-java-serialization-example/" target="_blank">Java Objects</a> into their <a href="http://crunchify.com/json-manipulation-in-java-examples/" target="_blank">JSON</a> representation. It works also in reverse order deserializing the specified <code>JSONObject</code> or <code>JSONArray</code> into an object of the specified class.</p>
<h3 class="r">How to convert Java object to / from JSON (Gson)?</h3>
<p>In this tutorial we will go over below steps:</p>
<ol>
<li><a href="http://crunchify.com/linux-and-curl-how-to-use-bash-to-read-a-file-line-by-line-and-execute-curl-command-to-get-http-result/" target="_blank">Read File</a> content from file in Java</li>
<li>We will use <a href="http://crunchify.com/what-is-regex-pattern-regular-expression-how-to-use-it-in-java-example-attached/" target="_blank">regex split</a> operation to bypass any <a href="http://crunchify.com/basic-html-how-do-you-create-blank-space-in-html/" target="_blank">blank space</a> in between words</li>
<li>Create JSONObject out of each line</li>
<li>Add each <code>JSONObject to JSONArray</code></li>
<li><a href="http://crunchify.com/java-how-to-parse-jsonobject-and-jsonarrays/" target="_blank">Print JSONArray</a></li>
<li>Now using Gson&#8217;s <code>fromJson()</code> method we will deserialize JSONArray to <a href="http://crunchify.com/how-to-convert-hashmap-to-arraylist-in-java/" target="_blank">ArrayList</a></li>
</ol>
<p>In order to run below code you need below <a href="http://crunchify.com/how-to-create-build-java-project-including-all-dependencies-using-maven-maven-resources-maven-dependency-maven-jar-plugin-tutorial/" target="_blank">Maven dependency</a>.</p><pre class="crayon-plain-tag">&lt;dependency&gt;
    &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
    &lt;artifactId&gt;gson&lt;/artifactId&gt;
    &lt;version&gt;2.8.0&lt;/version&gt;
&lt;/dependency&gt;</pre><p>Also, here is a file which we are using in below program: <a href="http://cdn.crunchify.com/wp-content/uploads/code/crunchify-gson.txt" target="_blank">http://crunchify.com/wp-content/uploads/code/crunchify-gson.txt</a></p>
<p>Please download and put it under <code>C: drive or Documents folder</code> and update path below.</p>
<h3>Java code:</h3>
<p></p><pre class="crayon-plain-tag">package crunchify.com.tutorials;

import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;

import org.json.JSONArray;
import org.json.JSONObject;

import com.google.gson.Gson;

/**
 * @author Crunchify.com 
 * Gson() -&gt; fromJson() to deserializes the specified Json into an object of the specified class
 */

public class CrunchifyGoogleGSONExample {

	public static void main(String[] args) {
		JSONArray array = readFileContent();
		convertJSONArraytoArrayList(array);
	}

	private static void convertJSONArraytoArrayList(JSONArray array) {

		// Use method fromJson() to deserializes the specified Json into an object
		// of the specified class
		final ArrayList&lt;?&gt; jsonArray = new Gson().fromJson(array.toString(), ArrayList.class);
		log("\nArrayList: " + jsonArray);

	}

	private static JSONArray readFileContent() {
		JSONArray crunchifyArray = new JSONArray();
		String lineFromFile;

		try (BufferedReader bufferReader = new BufferedReader(new FileReader("/Users/appshah/Documents/crunchify-gson.txt"))) {

			while ((lineFromFile = bufferReader.readLine()) != null) {
				if (lineFromFile != null &amp;&amp; !lineFromFile.isEmpty()) {
					JSONObject crunchifyObject = new JSONObject();
					log("Line: ==&gt;" + lineFromFile);

					// escape any blank space between tokens
					String[] split = lineFromFile.split("\\s+");
					crunchifyObject.put("companyName", split[0]);
					crunchifyObject.put("address", split[1]);
					crunchifyObject.put("description", split[2]);
					crunchifyArray.put(crunchifyObject);
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		System.out.println("\nJSONArray: " + crunchifyArray.toString());
		return crunchifyArray;

	}

	private static void log(Object string) {
		System.out.println(string);
	}
}</pre><p></p>
<h3>Output:</h3>
<p></p><pre class="crayon-plain-tag">Line: ==&gt;Crunchify.com  NewYork        Java&amp;Blogging
Line: ==&gt;Google.com     MountainView        SearchEngine
Line: ==&gt;Facebook.com      SanJose          SocialMedia
Line: ==&gt;Twitter.com          SanFrancisco         TweetTweet

JSONArray: [{"address":"NewYork","companyName":"Crunchify.com","description":"Java&amp;Blogging"},{"address":"MountainView","companyName":"Google.com","description":"SearchEngine"},{"address":"SanJose","companyName":"Facebook.com","description":"SocialMedia"},{"address":"SanFrancisco","companyName":"Twitter.com","description":"TweetTweet"}]

ArrayList: [{address=NewYork, companyName=Crunchify.com, description=Java&amp;Blogging}, {address=MountainView, companyName=Google.com, description=SearchEngine}, {address=SanJose, companyName=Facebook.com, description=SocialMedia}, {address=SanFrancisco, companyName=Twitter.com, description=TweetTweet}]</pre><p>Here is a Google Gson Goal from official Github Repository:</p>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/02/Google-Gson-Goal-from-official-Github-repo.png"><img class="alignnone size-full wp-image-10365" src="http://cdn.crunchify.com/wp-content/uploads/2017/02/Google-Gson-Goal-from-official-Github-repo.png" alt="" width="1696" height="400" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/02/Google-Gson-Goal-from-official-Github-repo.png 1696w, http://cdn.crunchify.com/wp-content/uploads/2017/02/Google-Gson-Goal-from-official-Github-repo-768x181.png 768w" sizes="(max-width: 1696px) 100vw, 1696px" /></a></p>

<div class="ezAdsense adsense adsense-leadout" style="text-align:left;margin:0px;"><div style="margin-top:10px;margin-bottom: 20px;">

Have a suggestion on article? Please chime in and share it as a comment.

</div>

<div style="clear:both"></div></div>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/how-to-use-gson-fromjson-to-convert-the-specified-json-into-an-object-of-the-specified-class/">How to use Gson -> fromJson() to convert the specified JSON into an Object of the Specified Class</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/java-how-to-parse-jsonobject-and-jsonarrays/" rel="bookmark" title="Java: How to Parse JSONObject and JSONArrays &#8211; Beginner&#8217;s Guide">Java: How to Parse JSONObject and JSONArrays &#8211; Beginner&#8217;s Guide </a></li>
<li><a href="http://crunchify.com/complete-end-to-end-java-tutorial-with-singleton-object-employee-crunchify-object-pojo-detailed-testcase/" rel="bookmark" title="Complete End to End Java Tutorial with Singleton Object Employee, Crunchify Java POJO and Detailed TestCase">Complete End to End Java Tutorial with Singleton Object Employee, Crunchify Java POJO and Detailed TestCase </a></li>
<li><a href="http://crunchify.com/in-java-how-to-flatten-or-unflatten-complex-json-objects-into-flat-map-like-structure/" rel="bookmark" title="In Java How to Flatten or Unflatten Complex JSON objects into Flat &#038; Map-Like Structure">In Java How to Flatten or Unflatten Complex JSON objects into Flat &#038; Map-Like Structure </a></li>
</ol>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Crunchify?a=PwbGaSavWmE:I5qb0Pn42pw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Crunchify?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Crunchify/~4/PwbGaSavWmE" height="1" width="1" alt=""/>]]></content:encoded>
			<wfw:commentRss>http://crunchify.com/how-to-use-gson-fromjson-to-convert-the-specified-json-into-an-object-of-the-specified-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://crunchify.com/how-to-use-gson-fromjson-to-convert-the-specified-json-into-an-object-of-the-specified-class/</feedburner:origLink></item>
		<item>
		<title>What is Lock(), UnLock(), ReentrantLock(), TryLock() and How it’s different from Synchronized Block in Java?</title>
		<link>http://feedproxy.google.com/~r/Crunchify/~3/zrp4_kvLp50/</link>
		<comments>http://crunchify.com/what-is-lock-unlock-reentrantlock-trylock-and-how-its-different-from-synchronized-block-in-java/#respond</comments>
		<pubDate>Tue, 24 Jan 2017 09:16:56 +0000</pubDate>
		<dc:creator><![CDATA[App Shah]]></dc:creator>
				<category><![CDATA[Core Java and J2EE Tutorials and Tips]]></category>
		<category><![CDATA[Eclipse IDE Tips and Tutorials]]></category>
		<category><![CDATA[Java Concurrency Tutorial]]></category>
		<category><![CDATA[Java Lock Example and Concurrency Lock vs synchronized]]></category>
		<category><![CDATA[locking mechanism in java]]></category>
		<category><![CDATA[Locks in Java]]></category>
		<category><![CDATA[Synchronization vs Lock]]></category>
		<category><![CDATA[Synchronized Block]]></category>
		<category><![CDATA[UnLock in Java]]></category>
		<category><![CDATA[UnLock tutorial]]></category>
		<category><![CDATA[What is Reentrant Lock in Java]]></category>

		<guid isPermaLink="false">http://crunchify.com/?p=6843</guid>
		<description><![CDATA[<p>In this tutorial we will go over Lock(), UnLock(), ReentrantLock(), TryLock() and how it&#8217;s different from Synchronized Block in Java. If you have also below questions then you are at right place. Locks in Java Java Lock Example and Concurrency Lock vs synchronized Java Concurrency Tutorial – Reentrant Locks synchronization &#8211; Proper lock/unlock usage for Java... <br /><a
class="more-link" href="http://crunchify.com/what-is-lock-unlock-reentrantlock-trylock-and-how-its-different-from-synchronized-block-in-java/">Read Article &#160; <i class="fa fa-chevron-circle-right" aria-hidden="true"></i></a></p>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/what-is-lock-unlock-reentrantlock-trylock-and-how-its-different-from-synchronized-block-in-java/">What is Lock(), UnLock(), ReentrantLock(), TryLock() and How it&#8217;s different from Synchronized Block in Java?</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/what-is-java-semaphore-and-mutex-java-concurrency-multithread-explained-with-example/" rel="bookmark" title="What is Java Semaphore and Mutex &#8211; Java Concurrency MultiThread explained with Example">What is Java Semaphore and Mutex &#8211; Java Concurrency MultiThread explained with Example </a></li>
<li><a href="http://crunchify.com/java-iterator-outofmemory-oom-scenario/" rel="bookmark" title="Java Iterator: OutOfMemory (OOM) Scenario">Java Iterator: OutOfMemory (OOM) Scenario </a></li>
<li><a href="http://crunchify.com/how-to-generate-java-deadlock-programmatically-and-how-to-analyze-deadlock/" rel="bookmark" title="How to Generate Java Deadlock Programmatically and How to Analyze Deadlock">How to Generate Java Deadlock Programmatically and How to Analyze Deadlock </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[
<div class="ezAdsense adsense adsense-leadin" style="text-align:center;margin:0px;"><div  style="margin-bottom:20px;margin-top:1px;">
<!-- Crunchify.Post.Top -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-4032710958875645"
     data-ad-slot="7425196307"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

</div>
<div style="clear:both"></div></div>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2014/11/What-is-Lock-UnLock-ReentrantLock-TryLock.png"><img class="alignnone size-full wp-image-10358" src="http://cdn.crunchify.com/wp-content/uploads/2014/11/What-is-Lock-UnLock-ReentrantLock-TryLock.png" alt="" width="1606" height="700" srcset="http://cdn.crunchify.com/wp-content/uploads/2014/11/What-is-Lock-UnLock-ReentrantLock-TryLock.png 1606w, http://cdn.crunchify.com/wp-content/uploads/2014/11/What-is-Lock-UnLock-ReentrantLock-TryLock-768x335.png 768w" sizes="(max-width: 1606px) 100vw, 1606px" /></a></p>
<p>In this tutorial we will go over Lock(), UnLock(), ReentrantLock(), TryLock() and how it&#8217;s different from <a href="http://crunchify.com/hashmap-vs-concurrenthashmap-vs-synchronizedmap-how-a-hashmap-can-be-synchronized-in-java/" target="_blank">Synchronized</a> Block in <a href="http://crunchify.com/how-to-use-expiringmap-maven-java-utility-to-remove-expired-objects-from-map-automatically-complete-java-tutorial/" target="_blank">Java</a>.</p>
<p>If you have also below questions then you are at right place.</p>
<ul>
<li class="r">Locks in Java</li>
<li class="r">Java Lock Example and <a href="http://crunchify.com/have-you-noticed-race-condition-in-java-multithreading-concurrency-example-how-to-deal-with-it/" target="_blank">Concurrency</a> Lock vs synchronized</li>
<li class="r">Java Concurrency Tutorial – Reentrant Locks</li>
<li class="r">synchronization &#8211; Proper lock/unlock usage for Java</li>
<li class="r">java &#8211; Synchronization vs Lock</li>
<li>java lock unlock example</li>
<li>locking mechanism in java</li>
<li>java lock unlock different thread</li>
</ul>
<p>Let&#8217;s get started. 1st let&#8217;s understand each of these terms and then we will go over <a href="http://crunchify.com/what-is-regex-pattern-regular-expression-how-to-use-it-in-java-example-attached/" target="_blank">working example</a>.</p>
<h4>Lock():</h4>
<p><code>java.util.concurrent.locks</code>. A lock is a <a href="http://crunchify.com/what-is-daemon-thread-in-java-example-attached/" target="_blank">thread</a> synchronization mechanism like synchronized blocks except locks can be more sophisticated than Java&#8217;s synchronized blocks. It is an <a href="http://crunchify.com/what-is-an-interface-in-java-how-its-used-java-tutorial-example-attached/" target="_blank">interfaces</a> and classes providing a <a href="http://crunchify.com/spring-framework-4-order-annotation-tutorial-sort-order-for-an-annotated-component/" target="_blank">framework</a> for locking and waiting for conditions that is distinct from built-in synchronization and monitors.</p>
<h4>UnLock():</h4>
<p class="p1"><span class="s1">UnLock() releases the lock on <a href="http://crunchify.com/create-simple-pojo-and-multiple-java-reflection-examples/" target="_blank">Object</a>.</span></p>
<h4>ReentrantLock():</h4>
<p>A <code>ReentrantLock</code> is <em>owned</em> by the thread last successfully locking, but not yet unlocking it. A thread invoking <code>lock</code> will return, successfully acquiring the lock, when the lock is not owned by another thread. The method will return immediately if the current thread already owns the lock.</p>
<h4>TryLock():</h4>
<p class="p1"><span class="s1">TryLock() acquires the lock only if it is free at the <a href="http://crunchify.com/java-timer-and-timertask-reminder-class-tutorials-example/" target="_blank">time</a> of invocation.</span></p>
<p><strong><code>Tip1:</code></strong> If you&#8217;re simply locking an object, I&#8217;d prefer to use <code>synchronized.</code></p><pre class="crayon-plain-tag">Lock.lock();
youMethod(); // Throws a NullPointerException!
Lock.unlock(); // Here you never release the lock!</pre><p>Whereas with <a href="http://crunchify.com/implement-simple-threadsafe-cache-using-hashmap-without-using-synchronized-collection/" target="_blank">synchronized</a>, it&#8217;s super clear and impossible to get wrong:</p><pre class="crayon-plain-tag">synchronized(myObject) {
      doSomethingNifty();
}</pre><p></p>
<h3>Example Details:</h3>
<ol>
<li>Create class: CrunchifyLockTutorial.java</li>
<li>Create <a href="http://crunchify.com/java-static-methods-variables-static-block-and-class-with-example/" target="_blank">inner classes</a>: Company and CrunchifyLoop</li>
<li>From Main create two objects of class Company</li>
<li>Start <a href="http://crunchify.com/thread-safe-and-a-fast-singleton-implementation-in-java/" target="_blank">thread loop</a> for 10 on those objects</li>
<li>While Company1 talks to Company2 &#8211; it locks an object. If at the same time &#8211; if <code>Company2</code> wants to talk to <code>Company1</code> then it says &#8211; Conflicting &#8211; Lock already exist. (Both companies are already in talk).</li>
</ol>
<p></p><pre class="crayon-plain-tag">package crunchify.com.tutorial;

import java.util.Random;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @author Crunchify.com
 *
 */

public class CrunchifyLockTutorial {
	public static void main(String[] args) {
		final Company crunchify = new Company("Crunchify");
		final Company google = new Company("Google");
		new Thread(new CrunchifyLoop(crunchify, google)).start();
		new Thread(new CrunchifyLoop(google, crunchify)).start();
	}

	// Class CrunchifyLoop
	static class CrunchifyLoop implements Runnable {
		private Company companyName1;
		private Company companyName2;

		public CrunchifyLoop(Company companyName1, Company companyName2) {
			this.companyName1 = companyName1;
			this.companyName2 = companyName2;
		}

		public void run() {
			Random random = new Random();
			// Loop 10
			for (int counter = 0; counter &lt;= 10; counter++) {
				try {
					Thread.sleep(random.nextInt(5));
				} catch (InterruptedException e) {
				}
				companyName2.crunchifyTalking(companyName1);
			}
		}
	}

	// Class Company
	static class Company {
		private final String companyName;

		// ReentrantLock: Creates an instance of ReentrantLock. This is equivalent to using ReentrantLock(false)
		private final Lock lock = new ReentrantLock();

		// Constructor
		public Company(String name) {
			this.companyName = name;
		}

		public String getName() {
			return this.companyName;
		}

		public boolean isTalking(Company companyName) {
			Boolean crunchifyLock = false;
			Boolean googleLock = false;
			try {
				// tryLock: Acquires the lock only if it is free at the time of invocation.
				crunchifyLock = lock.tryLock();
				googleLock = companyName.lock.tryLock();
			} finally {
				if (!(crunchifyLock &amp;&amp; googleLock)) {
					if (crunchifyLock) {
						// unlock: Releases the lock.
						lock.unlock();
					}
					if (googleLock) {
						companyName.lock.unlock();
					}
				}
			}
			return crunchifyLock &amp;&amp; googleLock;
		}

		public void crunchifyTalking(Company companyName) {
			// Check if Lock is already exist?
			if (isTalking(companyName)) {
				try {
					System.out.format("I'm %s: talking to %s %n", this.companyName, companyName.getName());
				} finally {
					lock.unlock();
					companyName.lock.unlock();
				}
			} else {
				System.out.format("\tLock Situation ==&gt; I'm %s: talking to %s, but it seems"
						+ " we are already talking. Conflicting. %n", this.companyName, companyName.getName());
			}
		}
	}
}</pre><p></p>
<h4>Output:</h4>
<p></p><pre class="crayon-plain-tag">I'm Crunchify: talking to Google 
	Lock Situation ==&gt; I'm Google: talking to Crunchify, but it seems we are already talking. Conflicting. 
I'm Google: talking to Crunchify 
I'm Google: talking to Crunchify 
I'm Crunchify: talking to Google 
I'm Google: talking to Crunchify 
I'm Google: talking to Crunchify 
I'm Crunchify: talking to Google 
	Lock Situation ==&gt; I'm Google: talking to Crunchify, but it seems we are already talking. Conflicting. 
	Lock Situation ==&gt; I'm Crunchify: talking to Google, but it seems we are already talking. Conflicting. 
	Lock Situation ==&gt; I'm Google: talking to Crunchify, but it seems we are already talking. Conflicting. 
I'm Crunchify: talking to Google 
I'm Google: talking to Crunchify 
I'm Google: talking to Crunchify 
I'm Crunchify: talking to Google 
I'm Google: talking to Crunchify 
	Lock Situation ==&gt; I'm Google: talking to Crunchify, but it seems we are already talking. Conflicting. 
	Lock Situation ==&gt; I'm Crunchify: talking to Google, but it seems we are already talking. Conflicting. 
I'm Crunchify: talking to Google 
I'm Crunchify: talking to Google 
I'm Crunchify: talking to Google 
I'm Crunchify: talking to Google</pre><p><strong><code>Tip2:</code></strong> You can achieve everything the utilities in <code>java.util.concurrent</code> do with the low-level <a href="http://crunchify.com/java-how-to-sort-a-map-on-the-values-the-map-interface-java-collections/" target="_blank">primitives</a> like <code>synchronized</code>, <a href="http://crunchify.com/how-to-create-a-simple-in-memory-cache-in-java-lightweight-cache/" target="_blank"><code>volatile</code></a>, or <code>wait</code>.</p>

<div class="ezAdsense adsense adsense-leadout" style="text-align:left;margin:0px;"><div style="margin-top:10px;margin-bottom: 20px;">

Have a suggestion on article? Please chime in and share it as a comment.

</div>

<div style="clear:both"></div></div>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/what-is-lock-unlock-reentrantlock-trylock-and-how-its-different-from-synchronized-block-in-java/">What is Lock(), UnLock(), ReentrantLock(), TryLock() and How it&#8217;s different from Synchronized Block in Java?</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/what-is-java-semaphore-and-mutex-java-concurrency-multithread-explained-with-example/" rel="bookmark" title="What is Java Semaphore and Mutex &#8211; Java Concurrency MultiThread explained with Example">What is Java Semaphore and Mutex &#8211; Java Concurrency MultiThread explained with Example </a></li>
<li><a href="http://crunchify.com/java-iterator-outofmemory-oom-scenario/" rel="bookmark" title="Java Iterator: OutOfMemory (OOM) Scenario">Java Iterator: OutOfMemory (OOM) Scenario </a></li>
<li><a href="http://crunchify.com/how-to-generate-java-deadlock-programmatically-and-how-to-analyze-deadlock/" rel="bookmark" title="How to Generate Java Deadlock Programmatically and How to Analyze Deadlock">How to Generate Java Deadlock Programmatically and How to Analyze Deadlock </a></li>
</ol>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Crunchify?a=zrp4_kvLp50:VLEK9x5qbNc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Crunchify?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Crunchify/~4/zrp4_kvLp50" height="1" width="1" alt=""/>]]></content:encoded>
			<wfw:commentRss>http://crunchify.com/what-is-lock-unlock-reentrantlock-trylock-and-how-its-different-from-synchronized-block-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://crunchify.com/what-is-lock-unlock-reentrantlock-trylock-and-how-its-different-from-synchronized-block-in-java/</feedburner:origLink></item>
		<item>
		<title>How to Modify Feedburner Email out Timing and Email Branding?</title>
		<link>http://feedproxy.google.com/~r/Crunchify/~3/hEVmewkfvMY/</link>
		<comments>http://crunchify.com/modify-feedburner-email-timing-branding/#respond</comments>
		<pubDate>Mon, 23 Jan 2017 02:50:55 +0000</pubDate>
		<dc:creator><![CDATA[App Shah]]></dc:creator>
				<category><![CDATA[WordPress Tips, Tricks and Hacks]]></category>

		<guid isPermaLink="false">http://crunchify.com/?p=10308</guid>
		<description><![CDATA[<p>Email marketing is one of the major strategy for lots of companies. There are numerous email marketing tools out available for us to use. Some in the form of free plugins and some are paid. At Crunchify, we are using Google Feedburner for sending out daily emails about newly published articles. With more than tens... <br /><a
class="more-link" href="http://crunchify.com/modify-feedburner-email-timing-branding/">Read Article &#160; <i class="fa fa-chevron-circle-right" aria-hidden="true"></i></a></p>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/modify-feedburner-email-timing-branding/">How to Modify Feedburner Email out Timing and Email Branding?</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/how-to-add-after-post-widget-area-in-genesis-2-0-framework-wordpress-tips/" rel="bookmark" title="How to Add After Post Widget Area in Genesis 2.0 Framework- WordPress Tips">How to Add After Post Widget Area in Genesis 2.0 Framework- WordPress Tips </a></li>
<li><a href="http://crunchify.com/how-to-add-custom-sidebar-for-custom-post-type-cpt-in-wordpress/" rel="bookmark" title="How to Add/Change Custom Sidebar for Custom Post Type (CPT) in WordPress">How to Add/Change Custom Sidebar for Custom Post Type (CPT) in WordPress </a></li>
<li><a href="http://crunchify.com/the-best-non-profit-wordpress-theme/" rel="bookmark" title="The Best Non Profit WordPress Theme">The Best Non Profit WordPress Theme </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[
<div class="ezAdsense adsense adsense-leadin" style="text-align:center;margin:0px;"><div  style="margin-bottom:20px;margin-top:1px;">
<!-- Crunchify.Post.Top -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-4032710958875645"
     data-ad-slot="7425196307"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

</div>
<div style="clear:both"></div></div>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/01/Feed-Burner-Email-Delivery-Option-Crunchify.jpg"><img class="alignnone size-full wp-image-10356" src="http://cdn.crunchify.com/wp-content/uploads/2017/01/Feed-Burner-Email-Delivery-Option-Crunchify.jpg" alt="" width="1933" height="838" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/01/Feed-Burner-Email-Delivery-Option-Crunchify.jpg 1933w, http://cdn.crunchify.com/wp-content/uploads/2017/01/Feed-Burner-Email-Delivery-Option-Crunchify-768x333.jpg 768w" sizes="(max-width: 1933px) 100vw, 1933px" /></a></p>
<p>Email <a href="http://crunchify.com/what-is-affiliate-cloaking-and-how-to-cloak-your-affiliate-link-without-wordpress-plugin/" target="_blank">marketing</a> is one of the major strategy for lots of companies. There are numerous <a href="http://crunchify.com/how-to-configure-mailgun-email-server-on-discourse-forum-correct-way/" target="_blank">email</a> marketing tools out available for us to use. Some in the form of <a href="http://crunchify.com/wordpress-contact-form-plugins-google-form-favorite/" target="_blank">free plugins</a> and some are paid.</p>
<p>At Crunchify, we are using Google <a href="http://crunchify.com/escape-character-utility-for-url-and-json-data-free-to-use-in-your-project/" target="_blank">Feedburner</a> for sending out daily emails about newly published articles. With more than tens of thousands of subscribers we like the way Google Feedburner allows us <a href="http://crunchify.com/wordpress-yoast-seo-and-google-sitelinks-searchbox/" target="_blank">customization</a> multiple options. In this tutorial we will go over how to modify Email out Timing and email branding.</p>
<h3>Let&#8217;s get started:</h3>
<h3>Step-1</h3>
<ul>
<li>Login to <a href="http://crunchify.com/g-suite-google-forms-now-allowing-users-to-upload-file-from-google-drive-desktop/" target="_blank">Google</a> Feedburner</li>
<li>Click on <code>Publicize</code> Tab</li>
<li>Click on <code>Email Subscriptions</code> Tab</li>
<li>Click on <code>Delivery Options</code></li>
<li>Modify <a href="http://crunchify.com/15-essential-settings-and-optimization-tasks-after-installing-wordpress/" target="_blank"><code>Time Zone</code></a> and <code>Email Delivery Option</code></li>
</ul>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/01/Google-Feedburner-Dilivery-Option-Tips-by-Crunchify.png"><img class="alignnone size-full wp-image-10354" src="http://cdn.crunchify.com/wp-content/uploads/2017/01/Google-Feedburner-Dilivery-Option-Tips-by-Crunchify.png" alt="" width="1230" height="750" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/01/Google-Feedburner-Dilivery-Option-Tips-by-Crunchify.png 1230w, http://cdn.crunchify.com/wp-content/uploads/2017/01/Google-Feedburner-Dilivery-Option-Tips-by-Crunchify-768x468.png 768w" sizes="(max-width: 1230px) 100vw, 1230px" /></a></p>
<h3>Step-2</h3>
<p>Go to Email Branding Option. I would suggest you to modify below options.</p>
<ul>
<li>Email Subject/Title: <code>Crunchify Article: ${latestItemTitle}</code></li>
<li>Change Subject when an email has 2 or more items: Crunchify Articles: “${latestItemTitle}” plus ${m} more</li>
<li>Logo <a href="http://crunchify.com/looking-for-url-shortening-wordpress-plugin-reason-i-use-wp-bitly-for-my-custom-domain-crunchify-me/" target="_blank">URL</a>: Make sure logo width is no longer than <code>200px</code>.</li>
</ul>
<p><a href="http://cdn.crunchify.com/wp-content/uploads/2017/01/Google-Feedburner-Email-Branding-Options.png"><img class="alignnone size-full wp-image-10355" src="http://cdn.crunchify.com/wp-content/uploads/2017/01/Google-Feedburner-Email-Branding-Options.png" alt="" width="1226" height="676" srcset="http://cdn.crunchify.com/wp-content/uploads/2017/01/Google-Feedburner-Email-Branding-Options.png 1226w, http://cdn.crunchify.com/wp-content/uploads/2017/01/Google-Feedburner-Email-Branding-Options-768x423.png 768w" sizes="(max-width: 1226px) 100vw, 1226px" /></a></p>
<p>That&#8217;s it. I have modified these options since beginning and so far the <a href="http://crunchify.com/using-disqus-as-a-wordpress-comment-system-better-use-disqus-conditional-load-dcl/" target="_blank">feedback</a> I got from users were great.</p>
<h3>What is the best time to send out an email newsletter?</h3>
<p>Based on popular survey it seems, <a href="http://crunchify.com/running-wordpress-site-and-want-to-export-all-your-commenters-email-as-a-list/" target="_blank">Email</a> open rate is highest <code>@10am</code>. Also, email acceptance rate is highest <code>@mid-week</code> (Wednesday, Thursday).</p>

<div class="ezAdsense adsense adsense-leadout" style="text-align:left;margin:0px;"><div style="margin-top:10px;margin-bottom: 20px;">

Have a suggestion on article? Please chime in and share it as a comment.

</div>

<div style="clear:both"></div></div>
<p></p>
<p>The post <a rel="nofollow" href="http://crunchify.com/modify-feedburner-email-timing-branding/">How to Modify Feedburner Email out Timing and Email Branding?</a> appeared first on <a rel="nofollow" href="http://crunchify.com">Crunchify</a>.</p>
<p>Author: App Shah</p>
<div align="center"><a href="http://crunchify.com"><img src="http://cdn.crunchify.com/wp-content/uploads/2016/08/crunchify-logo.png" alt="Crunchify, LLC Logo" width="167" height="35" /></a></div>
<div style="clear:both"></div>
<p></p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="http://crunchify.com/how-to-add-after-post-widget-area-in-genesis-2-0-framework-wordpress-tips/" rel="bookmark" title="How to Add After Post Widget Area in Genesis 2.0 Framework- WordPress Tips">How to Add After Post Widget Area in Genesis 2.0 Framework- WordPress Tips </a></li>
<li><a href="http://crunchify.com/how-to-add-custom-sidebar-for-custom-post-type-cpt-in-wordpress/" rel="bookmark" title="How to Add/Change Custom Sidebar for Custom Post Type (CPT) in WordPress">How to Add/Change Custom Sidebar for Custom Post Type (CPT) in WordPress </a></li>
<li><a href="http://crunchify.com/the-best-non-profit-wordpress-theme/" rel="bookmark" title="The Best Non Profit WordPress Theme">The Best Non Profit WordPress Theme </a></li>
</ol>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Crunchify?a=hEVmewkfvMY:98fI72pUIkI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Crunchify?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Crunchify/~4/hEVmewkfvMY" height="1" width="1" alt=""/>]]></content:encoded>
			<wfw:commentRss>http://crunchify.com/modify-feedburner-email-timing-branding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://crunchify.com/modify-feedburner-email-timing-branding/</feedburner:origLink></item>
	<media:rating>nonadult</media:rating></channel>
</rss><!-- Dynamic page generated in 1.379 seconds. --><!-- Cached page generated by WP-Super-Cache on 2017-02-12 19:45:39 --><!-- Compression = gzip -->
