Hub Of Geekz

  • Home
  • About Me
  • Contact Us
  • Home
  • Languages
    • C++
    • Java
    • Perl
    • Prolog
    • Bootstrap
  • Database
    • SQL
    • PL/SQL
  • Study
    • Java
      • Java Collection
      • Java Concurrency
      • Java Interview Questions
      • Java Networking
    • Number System
  • Kavita
  • Entertainment
    • Hinglish Cafe
    • Videos
    • Jokes
  • Windows Tricks
  • How To

Saturday, 26 December 2015

44 ultimate guides to increase traffic on blog

 Earthcare Foundation NGO     11:00     Best Resources, Boost Traffic, Traffic, Ultimate Guide     13 comments   

 

 

Wow what an awesome post, 44 ultimate guides to increase traffic on blog. Definitely I am going to read this because I need traffic for my blog.

Oh don't worry! I was only dreaming that I will get comments like this.

For past few days, I am researching to increase the traffic on my blog. The web is like a sea which is full of "increase traffic on blog" posts like 10 ways to increase traffic on your blog or How I increased my blog's traffic by applying these 5 techniques.

I was totally confused which technique should I apply to increase traffic on blog. Sometimes I applied some technique for increasing traffic and sometime I applied some other technique for increasing traffic but because I was not applying any strategic way to increase traffic.

If you will read each of these posts then you will get idea about the strategies which you can apply for your blog.

So, I have taken the best guides present on the web which will be enough for anyone to increase traffic on blog. If anyone will follow these guides then I can assure that person that his/her blog will get the boosted traffic.

  1. Increase Website Traffic using ultimate tips- This is one of the best post to increase the traffic on blog. This post contains awesome ways to increase the traffic on blog. If someone is eager to increase traffic on blog then it is must read post.

  2. 7 Proven Strategies to Increase Your Blog's Traffic by 206%- This is one of the best guide to increase the traffic on blog. I liked all the strategies which Neil explained in his post but the first one is an awesome strategy which is Kindle Select 90-Day Traffic Plan. I researched a lot of guides but I didn't find this strategy to these guides.

  3. How to Grow Your Blog to 100,000 Visits a Month Within 1.5 Years- This is another great post by Neil. In this post he has explained how he got thousands of visitors to his different blogs. Again the best thing for me in this blog was partner up strategy with some magazine network.



  1. 101 Simple Tips To Increase Website Traffic- This post is best for its simplicity. It has pointed out all the points in simple one or two lines. The other best part of this guide is that all the tips are categorized in different categories such as SEO, Guest Posting, List Building.



  1. How I Get Over 100,000 Visitors a Month With Top List Articles - A good guide for bloggers who want to increase traffic by writing top list articles, just like which you are reading.



  1. Free Website Traffic 20 Tips to Increase Traffic to Your Website-A detailed post on increasing traffic on blog. This post contains 20 tips which are very helpful for increasing blog traffic. If you are able to apply 10 tips only on you log then your traffic will boost.



  1. How Six Blogs Increased Their Traffic to Millions of Visitors-A detailed post about the traffic status on six blogs, how these blogs have attracted this traffic and what can we learn  from these blogs.



  1. How To Grow a New Website to Over 100,000 Organic Visits Per Month-A detailed and good post about getting 100,000 visits per month on the blog. This post starts from basic such as Choosing the platform, Hosting services  So, it is best post for newbie blogger.



  1. 39 Actionable Ideas For Driving Traffic To Your Website-A point to point and short post which you can read in some minutes and get a brief ideas about the strategies involved in increasing traffic on the blog.

  2. White Hat SEO Case Study: How To Get a #1 Ranking-This is one of the best post in which one case study is explained. In case study, you will get one new strategy which is skyscraper technique. If you want to know more about this technique, read this article. You will love it.



  1. How to Increase Your Website's Traffic - Without Any Marketing-Short and good post with around 4 strategies which are very important if you want to increase traffic on blog.



  1. Tips for Increasing Website Traffic | Business Unplugged-This post has a lot of strategies to increase traffic on blog. The good thing about this post is that for every strategy, different blogger has present the view about that strategy.



  1. 4 Ways to Increase Your Traffic With StumbleUpon-One effective and awesome strategy to get unlimited traffic. This post is specific to StumbleUpon ways to increase the traffic. If you don't know about StumbleUpon then it is a must read post which will boost the traffic of your blog.



  1. How To Get Over 50,000 Visits to Your Blog in the First Month-It explains how they have got good amount of traffic from different sources. They have explained few strategies but they are the basic strategies and everybody has to follow these strategies to get the traffic.



  1. 101 Ways to Promote your Blog & get more visitors-One of the best post for increasing the traffic on your blog. It has detailed strategies with good graphics which makes this article more interesting to read.



  1. 31 Ways To Promote Blog Posts & Get Blog Traffic-One of the best post to read for increasing the traffic on blog. Best thing about this post is well designed and well written article and for every strategy they have explained it well. So a must read post if you want to increase traffic on blog.



  1. 49 Expert Tricks To Generate Huge Traffic To Your Site-49 awesome tricks which has been explained by expert blogger which is like best thing. You can learn from these tricks and can apply these tricks at your blog to increase the traffic.

  2.  How to Boost Blog and Website Traffic with Article Marketing-A good article with their own website example regarding the traffic. This article contains some unique content which makes it good to read article.



  1. How to get 150,000 people to read your blog post in 1 week-A short post explaining the ways to get a good amount of traffic to your content and main focus is on guest blogging.



  1. 131 Words That Increase Web Traffic -This post is all about magic of words. Everyone will tell you one thing that for getting traffic, you should write good content. A good content should contain good words which can attract the users. This post is all about those attracting words which is like magnet for users.



  1. 4 Reasons Your Traffic Is Increasing But Not Your Conversions-This post has explained about conversions which is very important. If you are successful in getting enough traffic but your conversion rates are not good then it is a good post to read.



  1. How to Turn Your Facebook Page Into an Insane Traffic Driving Machine-A detailed and good post to increase traffic to blog from social media Facebook. It contains all the aspects to increase the traffic on the blog.



  1. 14 Ways to Drive More Website Traffic With Pinterest-Now a days Pinterest has become a good source of traffic for your blog. So if you want to increase traffic from Pinterest then it is a good post to read.



  1. 12 SEO Tactics to Increase Traffic-12 SEO strategies which will get a lot of traffic to your blog if you will follow these strategies. The best thing is that all strategies are related to SEO which will also improve you SEO.



  1. 7 effective ways to Increase your social media traffic and conversion-The best and effective 7 ways which can attract millions of visitors to the blog which makes it a good article with attractive content.



  1. 57 Ways to Boost Your Blog Traffic- A short and point to point tricks post to increase traffic on blog.

  2.  21 Strategies to Drive More Free Website Traffic Today-An awesome post which consists of 21 strategies for        increasing traffic on the blog. Best thing about this blog is that it contains a good graphics and real time examples which makes this post a must read post.



  1. How Does Content Quantity Increase Your Traffic? A Data-Driven Answer-An awesome data driven approach to explain the importance of quality content to increase traffic on blog.



  1. 5 Ways to Improve Your Facebook Engagement -A good article with attractive graphics which explain 5 different ways to get traffic from best social media Facebook.



  1. 10 Ways to Exponentially Grow Your Traffic in 30 Days -One of the best post to get the tricks about increasing traffic. Tricks are not explained well but the tricks which are mentioned here are good and you can research about those tricks to get the benefit.



  1. 12 Ways to Increase Traffic From Google Without Building Links-I liked the snippet strategy in this article which is a good trick to increase traffic on the blog.



  1. 17 Ways To Immediately Improve Your Website Traffic-A very good post which covers mostly all the good strategies to increase the traffic on blog.



  1. 50 Free High PR Press Release Submission Sites To Increase Traffic-It is good for you if you want to submit your articles to Press Release Submission Sites. They have given 50 submission sites where if you will submit your articles then you will get good traffic.



  1. Top 5 Ways to Promote Your Content and Increase Website Traffic-Actually the article contains 5 ways to promote the content on Social media like Instagram, Pinterest etc. So, if you want to get traffic from Social media then it is a good post to read.



  1. 101 Ways to Get Quality Backlinks To Your Blog-As we know backlinks are good way to increase the authority as well as getting good traffic from other sources. If source has enough traffic then backlinks will be a good strategy for getting traffic from that source.



  1. SEO Success Story: Do it Yourself Strategies to Increase Web Traffic-A detailed article which starts from basics to the advanced level. It contains some good resources to use.

  2. The Top 10 Ways to Get the Traffic You Crave-As the article indicates, it has best 10 ways to increase traffic which makes it one of the best post to read.



  1. 10 Important Tips to Increase your Blog Traffic -A good post to read. Explained good tips which are very helpful in increasing the traffic.



  1. How To Increase Organic Traffic To Your Website |3 Solid Case Studies-A very good post for readers who wants to increase blog traffic by using organic traffic. 3 case studies are well explained and if you ill follow these case studies then you will be able to increase the traffic of blog.



  1. 50 Ways to Grow Your Blog Traffic-A point to point post which explains 50 ways to grow the traffic on the blog.



  1. How To Increase Your Blog Traffic With Article Marketing-A very good post if you want to increase traffic through article marketing. It explains all the aspects about article marketing.So a good post to read.



  1. What Type of Content Should You Publish To Increase Traffic?-This is a good post to read if you want to know about which type of content can increase the traffic. Article contains well explained points about different content types which can boost traffic on the blog.



  1. 100 Ways to Increase Blog Traffic Do You Know Them All?-This post is just like other normal posts which are point to point. What makes it different from others is its images which are good to see.



  1. 4 Ways to Improve Your SEO and Increase Your Traffic-Nice post. A very short post but attractive because of content.


Want to Increase Traffic on blog

So, I have worked hard to provide you the best resources to increase traffic on blog.

Now, its your turn to work hard. Read and try to follow some resources and feel the happiness of getting a good traffic to blog.

So, what are you waiting for, read these best resources and get more visitors, more shares and more comments.

Happy Blogging.

Do you have 10 seconds?

Please share it to encourage me and populate this ultimate post to others.

Click on any of the sharing button below.

 

 

 
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Saturday, 14 November 2015

Top 7 sites to find free images for blog

 Earthcare Foundation NGO     07:41     Blogging, creative commons website, free images, Image Websites, public domain     2 comments   

If you are a blogger and you are publishing your posts without images then you are loosing at least 30% of your traffic.So be ready to know the resource from where you can get free images for blog.

best and free images for blog

 

In this post I will tell you best resources from where you can find out best and free images for blog.

First, I will tell you why do you need images for your blog. As you know, no one likes the plain text. So, with that plain text, if you can add some images to that post then readers will be more interested in reading that post because you have heard the saying that “A picture paints a thousand words”.

Convinced to use free image for blog


So, now if you have decided to use the free images for your blog, the next question is from where can we find these images? Most of the people will say, simply search for google images and you will find a lot of free images for blog. But one question from my side, if you have used image at your blog that is not freely available to everyone (means we need to pay for that image to get the copyright) and the owner can claim that you are using that image without owner’s permission then what will happen. Your post can be banned from search and that will affect the ranking if your blog.

Solution for using free images for blog


I think now you know that not every image that is available on the internet is free.  But there are a tons of websites from where you can download and use the picture without any copyright issues.

So here are the best image websites from where you can download the image and can use those images:


  1. UnSplash




unSplash

This is one of the best website for using free images for the blog. UnSplash provides 10 new photos in every 10 days. It has a huge database of images under CC0 category means we can use these images on our blog directly or we can also modify the images and use it. The best thing is that we don’t have to ask for any permission.


  1. Flickr




flickr

This is another one of the best website which is gaining popularity day by day. It also contains a great database of free images under creative commons license. If you want to search any free image then search for the images which are under creative commons licence. Sometimes you have to provide the attribution and link back to the source image.


  1. Pixabay




pixabay

It is a free image resource which is continuously growing. It also contains a large collection of free images under public domain. The best thing is that for most of the images you don’t have to provide the attribution and link back to the source image.


  1. Life Of Pix




Life of Pix

You will get huge collection of high quality images at this website. You can use any image from this website as all the images on this website comes under public domain. The best thing about this website is that there is no copyright restriction.


  1. Public Domain Pictures




Public Domain

Another good resource for free images. It contains a large amount of free images which you can download by signing up for the website. There is also a premium download option which lets you download large size images.


  1. Creative Commons Search




creative commons search

It is kind of search engine instead of a website which provides you the access to a large collection of images. You can search the images from Flickr and Google Images by using this search engine.


  1. Google Image Search




google image search

Last but not least, this image search engine you already know. For searching free images you have to use advanced search option and you will get a huge collection from where you can select your image and use it.I will write one tutorial later for google image search.

So above are the websites which you can use to get the free images.

Know more websites which provides free images, please comment. I will add those websites also.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Sunday, 25 October 2015

Top 5 free and best blogging platforms

 Earthcare Foundation NGO     14:14     Blogging     No comments   

 

Do you have confusion about selecting the best blogging platforms?

Are you new to blogging?

Do you want to start a new blog?

If you are answering yes for above questions then this post is for you and you will get benefit by reading this post. After completing this post you will be able to select the best blogging platforms according to your need.

First of all I need to explain one thing that nothing is best for everyone. Someone likes something and some other person can like something else. It depends upon his needs what he wants to do with it.

As you are new to blogger then these platforms are best for you because you can set up blog within some clicks and you don’t have to worry about technical aspects such as web hosting, domain, maintenance of the blog and so on.

So, here are top 5 best blogging platforms which you can use as a blogger without any expenses:


  1. WordPress




Best Blogging Platforms

WordPress is very popular as a blogging platform. It is not only a blogging platform but it is also a good Content Management System and because of this also there also a lot of e-commerce websites which are using WordPress. For now there are 24% websites which are powered by WordPress.

So, WordPress allows you to make a blog and host it on its own server means you don’t have to worried about paying the money. You will get a wordpress.com domain where you can access your blog. If you want other domains then just buy some domain and use that one. There are a lot of free plugins which you can use for your blog. It has a large community support which has almost solution for every problem.

Create free blog with WordPress

So, as WordPress is suitable for individual blogger as well as a professional blog which has a lot of authors.

Start using WordPress today.


  1. Blogger




Blogger

Blogger is a google product, which is also a famous platform for blogging. It is very good option for new bloggers to start their blog. For starting a blog on blogger you only need one Gmail account. Just use your Gmail account to login on Blogger and start publishing your posts. At the same time by displaying the Adsense ads you can also earn some side income. Blogger is suitable only for individuals and it can’t be treated as business entity. So, if you want a blog only for your hobby purpose then it is best for you.

Start using Blogger today.


  1. Tumblr




Tumblr

Tumblr is a blogging platform as well as a social network. It is owned by Yahoo. The reason for its popularity is its ease of use and support for multiple text and media formats.

Tumblr is a powerful micro blogging platform with a strong social following. You can directly post from your phones. I think it is the best feature. So, if you are planning to blog mostly from your smartphone then it is best for you.

Start using Tumblr today.


  1. Medium




Medium

Medium is fairly a new blogging platform, started in 2012 by twitter co-founders Biz Stone and Evan Williams. Despite it is a new blogging platform, it has gained a lot of popularity as blogging platform. It provides a full featured WYSIWYG test editor to write your content and post it online. You don’t have any need to know the technical aspects to start a blog on this blogging platform. Medium is loved for its focus on writing and clutter free content.

Start using Medium today.


  1. Weebly




Weebly

Weebly is more famous for its website creation tool which will comes handy in designing a website within little time. But is also supports blogging. It has a lot of free themes which we can use as well as we can customize our layouts using its drag and drop components.

Start using Weebly today.

So, I have explained top 5 best blogging platforms which you can use to start a free blog. Now it depends upon your basic what do you want to do with this blog and whether you want to use it individually or as a business perspective. The other thing you have to consider whether you have some technical knowledge to maintain it.

So, please choose the blog according to your need.

Thanks for reading this post. If you think other blogging platform which is better than these platforms then comment. If you still have any doubts in selecting the blogging platform, please do comment we will get back to you as soon as possible.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Saturday, 24 October 2015

WordPress:How to create a free blog in 15 minutes

 Earthcare Foundation NGO     14:38     Blogging, WordPress     No comments   

WordPress: Start a free blog at best blogging platform
If you have one question in your mind “How to create a free blog?” then you are at right place. In this post I will explain you how to start a free blog on best blogging platform WordPress.

Today everyone wants to be a blogger. Someone wants to start it as hobby on the other side some other people want to start it to get some money. Whatever reason is there for starting a blog and become a blogger first step is to find out the platform where you will start blogging.

Getting Started: Choose the blogging platform

There are a lot of blogging platform where you can start blogging like WordPress, Blogger, Tumblr, Weebly and many more. You can start blogging on any of these platforms.

Top 5 blogging platforms where you can start blogging

Top 5 best blogging platforms

I will tell you how to start blogging on WordPress. I have chosen this platform because it is best for starting a free blog, even my blog is also on WordPress. There are following benefits of starting the blog on WordPress.

  • It is easy to use

  • It is freely available to start a blog

  • It is secure. WordPress is known for its security

  • It has a tons of freely available templates which you can use

  • It has a tons of free plugin which will be very helpful in setting up the blog


Ok, now it is clear why I am using this WordPress platform for starting a blog.

First go to WordPress

create free blog on WordPress

You will find the above screen. Now click on create blog link, you will be presented with some themes, select any theme

WordPress Themes

Then it will ask for the domain name you want for your blog. By default .wordpress.com will be appended to your domain name because it is freely available. You can also buy the domain name or if you already own a domain name then you can map it to the WordPress blog but it will cost you some money.

For now I am explaining the free domain option.

Insert any name which you want for your blog

WordPress Domain

Select the first option which is free. Next you will be asked for the plan, just choose the free plan

Next step is the email information and password.

Insert the values and that’s it you are done your account is created with the blog name you have supplied in previous step 2.

Now I will explain some of the WordPress options so that you can use them and make your blog more decorated and appealing.

You have a theme option, in that option you can select a theme for your blog

WordPress Themes

You just have to click on any theme and then it will open in new window and you will be able to see the preview. If you like the theme then just click on Save and Activate button at top left.

Apply WordPress Templates

There are a lot of plugins which you can use by clicking on the Plugins Add option which will show you plugins and you can install any plugin.

WordPress Plugins

For installing any plugin just click on any plugin and you will be at the plugin page, there just click the Install button and plugin will be installed.

Plugin Installation

After that plugin will be installed. To configure that plugin just click on Plugin option and you will be able to see all installed plugin, If you want to configure any of the plugin then you can do it from here.

Till now we were setting up the blog so that it can be attractive and easy to use but now I will explain the most important thing which is post.

Posts and Pages

By clicking on these options you will see the posts or pages present on your blog.

I will explain how to create a post. Click on Blog Posts Add button and you will be redirected to the page where you can write the post.

 create a blog post

For now the most important thing is your blog title and the body part. Try to find an attractive title so that you can attract some users and try to write good content for your post and after completing the post Publish the post.

So above is all about how to start a free blog with WordPress. I will explain some more options of WordPress in future posts. But for now it is enough to get started with WordPress and start a free blog.

So your journey doesn’t end here but It has started and if you want to make it successful and bright then try to produce great content and attract the users.

If you have any doubt or queries please comment and one more thing if you have liked this post then please share it and encourage me write good content post.

Do you have 10 seconds?


Please share it to encourage me and populate this information to others.

Click on any of the sharing button below.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Thursday, 22 October 2015

Great Topics for a Blog

 Earthcare Foundation NGO     06:02     Blogging, Comedy     No comments   

Do you know what a blogger thinks when he/she is going to write a blog post????????

[caption id="attachment_23" align="aligncenter" width="500"]Blogging Welocme to this blogging world[/caption]

A big question mark for those who are not bloggers and a little bit smaller question mark for fresh bloggers who has just started their blogs.

Even i am also a fresher in this field so i don't have much experience to give the answer of this question.But i will share my experience of blogging.

I don't know when i thought of starting a blog but when i thought about it.

I searched on google "In which topic should i write the blog?" 

I was shocked, my god,I got thousands of search result in which various topics were explained.Some posts were saying this should be the great topic and some were saying that should be the great topic.I was really confused which topic should  i choose for my blog.So i decided that i will decide the topic which will entertain people,which will contain some enjoying moments,which can attract people to my posts.I thought for more than ............................????????

Can you guess,You have following options:

1)100 years

2)1 years

3)1 months

4)1 week

5)1 day

6)1 hour

7)1 minute

8)1 second

Have you guessed the answer??????????????

Just think and give me a reasonable answer.

Ok , I will tell you the write answer,It is None of the above

I think it was a nice question and i know that the answer was best because in my blogs you have to think out of box,you have to think like a boy,not a men or women.So now you know the answer of the question.Now do you want to know the right answer????????

I know many of you don't want to know the answer.No problem,lets continue the post.

So after thinking for unknown time(which exactly i also don't know) i thought that its better to choose the entertaining area to write blog.I was very happy that i have decided the subject for my blog and i clicked on new post.Now i was thinking how can i entertain people,I have decided to entertain people but how there are various ways.Now again i was stuck in selection of subtopics.I again started thinking how can i make people laugh?????????? Because they don't know me and i also don't know me because it is easy to entertain ones whom you know because you know them,you know how they can laugh but i am writing something for people to whom i don't know.What am i supposed to write??

At that point an idea changed my life.That idea to become a blogger.Because i was thinking all the story about blogging and laughing.So i just thought that i can write on this topic to start my blogging.

So for me starting a blog was an entertaining idea.

So i have explained the life cycle of confusions in choosing a topic for a blog.

Hope everyone will like it.Just do comments for your precious feedback so that i can decide whether i should continue blogging or not.Or in other way i can say that i am a blogging type material or not?????????

Hahahahahahahahahah

Just Comment.....................................
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Thursday, 15 October 2015

PL/SQL Tutorial

 Earthcare Foundation NGO     10:00     PL/SQL, Programming     No comments   


Introduction to PL/SQL

During 1980s we were using the SQL which is not a procedural language, so because of this we were facing a lot of issues. So a new programming language was developed by Oracle Corporation in the late 1980s as procedural extension language for SQL and the Oracle relational database which was named as PL/SQL.
PL/SQL stands for Procedural Language extension of SQL.PL/SQL is a combination of SQL along with the procedural features of programming languages.

Features of PL/SQL

PL/SQL has the following features:
·         PL/SQL is tightly integrated with SQL
·         It offers extensive error checking
·         It is completely portable and high performance language
·         It offers a variety of programming structures
·         It supports structured programming through functions and procedures
·         It supports developing web applications and server pages
·         PL/SQL provides a built-in interpreted and OS independent programming environment.
·         PL/SQL saves time on design and debugging by strong features, such as exception handling, encapsulation, data hiding, and object-oriented data types.
·         Applications written in PL/SQL are fully portable.
·         PL/SQL provides high security level.
·         PL/SQL provides access to predefined SQL packages.

A Simple PL/SQL Block
PL/SQL block consists of 3 sections:
  • The Declaration section (optional).
  • The Execution section (mandatory).
  • The Exception Handling section (optional).
Declaration Section:

This section is optional and is used to declare any placeholders. These placeholders can be variables, constants cursors etc. The Declaration section of a PL/SQL Block starts with the reserved keyword DECLARE.
Execution Section:

Unlike declaration section, it is a mandatory section where the logic of the program will be written. The Execution section of a PL/SQL Block starts with the reserved keyword BEGIN and ends with END. We can use different types of constructs as for, while loops and conditional statements in this section. All the SQL queries will be also part of this section.
Exception Section:

This section is optional. The Exception section of a PL/SQL Block starts with the reserved keyword EXCEPTION. So if we think that there can be any error or exception then we can use this section and handle that exception.

DECLARE
     Variable declaration
BEGIN
     Program Execution
EXCEPTION
     Exception handling
END;

Simple Program:
DECLARE
   msg_to_user  varchar2(20):= 'Hello, World! This is my first program';
BEGIN
   dbms_output.put_line(msg_to_user  );
END;
/

Hello, World! This is my first program
PL/SQL procedure successfully completed.


You might be interested in

Cursor in PL/SQL
Triggers in PL/SQL
Create process in PL/SQL
PL/SQL program to find Greatest
PL/SQL program to get the area of circle
PL/SQL program to print different patterns
PL/SQL program to print Fibonacci Sequence
PL/SQL program to print the factorial of number
PL/SQL program to perform mathematical operations

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Saturday, 10 October 2015

Why String is immutable in Java

 Earthcare Foundation NGO     10:55     Java, Java Interview Questions     No comments   

This question can be answered by knowing the benefits of immutable classes. So, i will try to explain about immutable classes that will explicitly explain why strings are immutable in Java.
Immutable classes are those classes that cannot be modified after creation. If we want to modify immutable class then it will result in new immutable object.Immutable objects are very important in concurrency and they makes the programs efficient.
First we will see how to create an immutable object.As we know there are following step by which any object can be made as immutable:

1) Don't provide mutator methods for any field.
2) Make all the fields final and private
3) Don't allow subclasses by declaring the class final
4) Return deep cloned objects with copied content for all mutable fields in class
So we will apply these steps to create a immutable object.

public final class ImmutableClass{
private final String name;
private final String designation;
public ImmutableClass(String name,String designation){
this.name=name;
this.designation=designation;
}
public String getName(){
return name;
}
public String getDesignation(){
return designation;
}
}

So above is an example of an immutable class.
But there can be a case when we have to include an mutable class(such as Date) within an immutable class, Then what can we do? We will make it as final member but it can be modified internally. So in this case the best practise is to return the copy of that object instead of original object. FOr this we can clone that object and return it.
For Example

public final ImmutableClassWithMutableObject{
private final Date date;
public ImmutableClassWithMutableObject(Date date){
this.date=new Date(date.getTime());
}
public Date getDate(){
return (Date)date.clone();
}
}
So above is a program of immutable class when it contains a mutable class.

Advantages of immutable class:
1)They are thread safe so no need for synchronization
2)Immutable objects can be shared among threads without synchronization
3)Due to no synchronization performance of the application increases
4)They can be stored in cache and reused as Immutable objects Strings.

Disadvantage:
There is a huge disadvantage of creating garbage.Since immutable objects are use and throw so they create a huge garbage which reduces the performance of the application.

So above is all about immutable object.
So, now i think that everyone has understood why String is immutable in Java.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Java program to print patterns

 Unknown     00:17     Java, Patterns, Programming     No comments   

In this post I will explain the logic of printing different types of patterns. This post will clear all doubts for printing patterns and after this post you can print any type of patterns.
The most important thing about printing patterns is the logic, the way it can be printed, we just have to learn that logic after we get the idea of logic, we can print it using any programming language.
For this post I am using Java language, but as I said logic is important, if you are able to grab that logic then you can use any programming language to print those patterns.
First of all try to think a rectangular space for printing patterns which can be divided to 4 parts, following image shows that division:


So in above figure we have 4 parts, so while we will be printing something we will take these areas into consideration. For printing those parts we will be using for loop for each part.
For example suppose if we are going to print the following pattern
1
12
123
1234
12345
Then we are concerned about only first part.
And if we are going to print the following pattern

Then we are concerned about all 4 parts
In first part we have to print that number part after that in second and third part we have to print spacing part and in fourth part we again have to print that number part.
So in this way we will be printing the patterns.
Let’s print our first pattern which is

1                                       (1)
12                                     (2)
123                                   (3)
1234                                 (4)
12345                               (5)


For printing patterns first thing we need to know the number of lines we are going to print. In above pattern we have 5 lines so we will be using a for loop for tracking those lines.
·         For(int i=1,i<=5;i++)

After that since in above pattern we are concerned about first part only so we need only one for loop.
Now for first time when the outer loop execute then at that time the value of i would be 1 and we also have to print 1 in first line , for second time we have to print 1 and 2 and at that time value of I would be 2. So I think we can create some sequence. Suppose for second loop we will be using variable j then sequence is
·         For first row I=1    ==> we have to print j=1
·         For second row I=2    ==> we have to print j=1 2
·         For third row I=3    ==> we have to print j=1 2 3
·         For fourth row I=4    ==> we have to print j=1 2 3 4
·         For fifth row I=5    ==> we have to print j=1 2 3 4 5

That’s it 
We have created some type of relationship, for each row we have to print the value of j which will start from 1 and go till the value of i.
·                     for(int j=1;j<=i;j++){
·                      System.out.print(j);

And after completing 1 inner loop for value of j we have to change the line for that we will use this statement
·         System.out.print();
So in this way the above pattern will be printed.
Program for that pattern is following:



Program Code:
public class SimplePattern {


      public static void main( String arg[]){
                     //for row counts
                      for(int i=1;i<=5;i++){
                          //for printing numbers
                            for(int j=1;j<=i;j++){
                                System.out.print(j);
                            }
                           //for entering to new line
                            System.out.println();
                        }
                    }
                }


Output:


1
12
123
1234
12345
  


Now we are done with our first pattern we will print our next pattern which is following:




So in above pattern how any loops will be required????
·         1 for row count
·         4 for printing 4 parts
·         Total 5 loops
·         Outer Loop : for(int i=1;i<=5;i++)   Since 5 rows are there
·          For 1st part for(int j=1;j<=i;j++){
·              System.out.print(j);
First part I have already explained how to print.
So now I will explain second part, for this part we will be using variable k

Let’s try to establish some relationship
·         Initially we will need 4 spaces, in second row we will need 3 spaces for next row we will need 2 and so on
·         For this we will take one variable in outer loop and we will initialize its value with 4 and decrement it.
·         Our modified outer loop for(int i=1,z=4;i<=5;i++,z--)
·         Our for loop for second part is for(int k=z;k>=1;k--){
·                                              System.out.print(" ");
·                                             }
                                                               

Now we will try to print our 3rd part which is also equivalent to our second part so we will need same for loop values
·         for(int l=z;l>=1;l--){
·         System.out.print(" ");   
·         }

That’s it now we need our 4th part in which we have to print the values just like first part. So for loop for this part will be like 1st part
·         for(int m=1;m<=i;m++){
·         System.out.print(m);    
·         }


So that’s it we are done.
Following is the program to print the above pattern


Program Code:

public class SimplePattern {

                public static void main(String[] args) {
                                // TODO Auto-generated method stub

                                                for(int i=1,z=4;i<=5;i++,z--){
                                                                for(int j=1;j<=i;j++){
                                                                                System.out.print(j);       
                                                                }
                                                                for(int k=z;k>=1;k--){
                                                                                System.out.print(" ");   
                                                                }
                                                                for(int l=z;l>=1;l--){
                                                                                System.out.print(" ");   
                                                                }
                                                                for(int m=1;m<=i;m++){
                                                                                System.out.print(m);    
                                                                }
                                                                System.out.println();    
                                }
}







We have also seen patterns which will be towards downside direction like


12345
1234
123
12
1
And many more same logic can be applied there too.
So I am showing only program an output if there is any confusion or if you are not able to understand then I will also explain those patterns.



 
Program Code:


public class SimplePattern {

                public static void main(String[] args) {
                                // TODO Auto-generated method stub

                                for(int i=5;i>=1;i--){

                                   for(int j=1;j<=i;j++){
                                        System.out.print(j);
                                   }
                                 System.out.println();
                             }
                }

}



 Output:

12345
1234
123
12
1


 
Program Code:


public class SimplePattern {

                public static void main(String[] args) {
                                // TODO Auto-generated method stub

                                                for(int i=1;i<=5;i++){
                                                                for(int j=1;j<=i;j++){
                                                                                System.out.print(j);       
                                                                }
                                                                System.out.println();    
                                }
                               
                                                for(int i=4;i>=1;i--){

                                                                for(int j=1;j<=i;j++){
                                                                                System.out.print(j);
                                                                }
                                                                System.out.println();
                                                }
                               
                }

}


 Output:

1
12
123
1234
12345
1234
123
12

1








Program Code: 


public class SimplePattern {

                public static void main(String[] args) {
                                // TODO Auto-generated method stub

                                                for(int i=1,z=4;i<=5;i++,z--){
                                                                for(int j=1;j<=i;j++){
                                                                                System.out.print(j);       
                                                                }
                                                                for(int k=z;k>=1;k--){
                                                                                System.out.print(" ");   
                                                                }
                                                                for(int l=z;l>=1;l--){
                                                                                System.out.print(" ");   
                                                                }
                                                                for(int m=1;m<=i;m++){
                                                                                System.out.print(m);    
                                                                }
                                                                System.out.println();    
                                }
                               
                                                for(int i=4,z=1;i>=1;i--,z++){

                                                                for(int j=1;j<=i;j++){
                                                                                System.out.print(j);
                                                                }
                                                                for(int j=1;j<=z;j++){
                                                                                System.out.print(" ");
                                                                }
                                                                for(int j=1;j<=z;j++){
                                                                                System.out.print(" ");
                                                                }
                                                                for(int m=1;m<=i;m++){
                                                                                System.out.print(m);
                                                                }
                                                                System.out.println();



                                }
                               
                }
}                



Output:





So above is all about patterns if there is any confusion or you want to print some other patterns please comment. I will try to explain anything you want.
Thanks for reading this post.





Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Newer Posts Older Posts Home

Ad


Jobsmag.inIndian Education BlogThingsGuide

Subscribe

Do you want fresh and hot updates about us? Then subscribe to our Feeds.

Total Pageviews

Popular Posts

  • Write a program in PL/SQL to print the factorial of a number.
    In this post I will explain how to get the factorial of any given number. For that first you need to know what is the procedure to find ...
  • To find the GCD of two numbers in PROLOG.
    gcd(X,Y):-X=Y,write('GCD of two numbers is '),write(X); X=0,write('GCD of two numbers is '),write(Y); Y=0,write('G...
  • Write a PL/SQL code to get the Fibonacci Sequence
    First, I will explain what is Fibonacci Sequence and how to get this series. So, Fibonacci Sequence is a series of numbers 0,1,1,2,3,5,8,1...

Label

All Articles Best Resources Blogging Boost Traffic Bootstrap C Plus Plus Collection Comedy Comedy Posts Comedy Videos Concurrency creative commons website Education Employee Entertainment Fibonacci Sequence free images GirlFriend Hinglish Cafe How To Image Websites Inspirational Java Java Interview Questions Java Networking Kavita Sangrah Life Lock Sreen Love Number System Patterns Perl Picture PL/SQL Plastic Engineering Programming Prolog public domain SEO Servlet Short Story Shortcut Keys Social Media Social Services SQL SuVichar Thread Traffic True Events Ultimate Guide Windows Tricks Windows8.1 WordPress

Blog Archive

  • ►  2020 (43)
    • ►  September (41)
    • ►  August (2)
  • ►  2019 (1)
    • ►  July (1)
  • ►  2018 (9)
    • ►  September (7)
    • ►  July (1)
    • ►  May (1)
  • ►  2017 (8)
    • ►  June (3)
    • ►  May (3)
    • ►  March (1)
    • ►  January (1)
  • ►  2016 (2)
    • ►  September (1)
    • ►  January (1)
  • ▼  2015 (91)
    • ▼  December (1)
      • 44 ultimate guides to increase traffic on blog
    • ►  November (1)
      • Top 7 sites to find free images for blog
    • ►  October (6)
      • Top 5 free and best blogging platforms
      • WordPress:How to create a free blog in 15 minutes
      • Great Topics for a Blog
      • PL/SQL Tutorial
      • Why String is immutable in Java
      • Java program to print patterns
    • ►  May (10)
    • ►  March (20)
    • ►  February (50)
    • ►  January (3)
  • ►  2014 (339)
    • ►  December (1)
    • ►  October (55)
    • ►  September (58)
    • ►  August (94)
    • ►  July (64)
    • ►  June (67)
  • ►  2013 (34)
    • ►  August (5)
    • ►  April (29)
  • ►  2012 (20)
    • ►  November (1)
    • ►  October (15)
    • ►  September (4)

Author

  • Earthcare Foundation NGO
  • Kavita house
  • Unknown
  • Unknown

Info

Copyright © Hub Of Geekz | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates