stay tuned for current updates...

Thursday 29 September 2016

Flipkart's "Big Billion Days" - what it is?

The festive mood is on and the discount season is here to greet you. E-commerce industry is so competitive
that they all can do anything to cash on in this festive season. The result is what you can see on you TV
or newspaper ads or practically everywhere. Flipkart's "Big Billion Days", Amazon's "Great Indian Sale" and
Snapdeal's "Unbox Diwali" are scheduled for the festive season ahead. Sometimes, these sales might benefit
someone in rare cases, but most of the times, people end up being fooled by these e-commerce giants. Let's
see how..
http://www.promorecharge.com/wp-content/uploads/2015/10/flipkart-big-billion-day-sale.jpg

Just for quick information, do note that majority of revenue these e-commerce companies make is through
advertisements, banners on their page and sponsorships by the brands. Now, imagine the traffic generated
on these sale days. Since, a lot of buzz is created by the companies through heavy advertisements, people
log into their websites even if they do not intend to buy anything just to have an online window-shopping
experience. Now, this helps the companies generate a huge traffic and they end up making good money out of
this.

Another thing, in the previous sale, I logged into the app of one of these e-commerce giants during such a sale.
I had a firm belief that since this is the biggest sale, I am not going to get a thing cheaper than this anytime
anywhere. I had purchased a shoe just a month ago from the same site. So, I decided to do a random check and
trust me my belief was shattered. The same shoe which I had purchased at RS.1499 and which would not cost more than
Rs.2000 even in the market was being sold at Rs.1549 after striking off an MRP of Rs.4999 just to prove a single
point that this was the biggest sale ever. Since, people have a pre-thinking that they would get anything at the
cheapest rate in these sales, they do not do much research before buying a product a even a higher price and fall
into the trap.

Not only this, the bank partners who give attractive cashbacks during the sales, also end up crediting the amount after
a couple of months or sometimes even more, which is not at all that attractive as it seems. Sometimes, the old stocks or
poor quality products are also sold in the name of 'sale'. The customers fall into the trap seeing the price but end
up compromising with the quality.

So, next time when you see such attractive advertisements claiming the biggest sale in the country, take it with a
pinch of salt. Do a bit of research before buying any product. Think once if you really need the product or you are
buying it just for the sake of the sale. If you don't need the product, do spend your hard-earned money uselessly.
You will get the product at almost the same price anytime else when you genuinely need the product. Never have such
a pre-belief that the products being sold must be at the cheapest rate.

Wish you all a happy and responsible shopping this festive season!

Saturday 24 September 2016

Essential Mobile Apps That Can Help You With Your Online Marketing



The online marketing business is a dynamic field. Every internet marketer is expected to multi-task. In fact, by only being active, you can make your business successful. However, it is not easy to be active on the web. That is why a host of mobile apps is there for you to choose and maneuver the online and offline aspects of the business from your mobile phone.


Below is the list of Essential Mobile Apps That Can Help You With Your Online Marketing

Dropbox

When you are working in collaboration with another marketer, it is very important that both of you have complete access to the shared data. Opening a Dropbox account on your Android, Blackberry, or iPhone will give you a space of 2 GB. Keep your data in Dropbox and enjoy its full backup. As your partner will also have a Dropbox account, you can share files, graphics, and even videos of huge size without any difficulty.

Additionally, sharing files and ideas with your clients becomes very convenient with this mobile application. In case your client does not have Dropbox then also you can send data by sharing a public link. 

For your business, if 2GB free space is not enough then you can get more space by paying a monthly charge and get up to 100 GB space.

Gotomeeting

Many online marketers prefer to work from home or from cafe's. Hence, scheduling a meeting with the clients would create undue expenses for you. With Gotomeeting, you can conduct client meetings from your home, cafe or anywhere you want. This mobile application provides a complete sound and picture quality, and even lets you share visuals with your clients.

All Android based phone and iPhone users can download Gotomeeting. Truly, it is one of the Essential Mobile Apps That Can Help You With Your Online Marketing.

Evernote

Internet business ideas can strike anywhere - waiting for the client in a restaurant or while having breakfast. With Evernote, you do not need to have a pen and paper to jot down your business concepts.

This mobile app is compatible with iPhone, Blackberry, and Android phones. Evernote lets you create notes with different colors and fonts as per your convenience. Moreover, you can also snap pictures of your clients' business cards or other important material and save it in Evernote.

The application organizes all your data automatically. For instance, your notes and photos will be categorized in terms of the relevant keywords that exist in them. Hence, you will not have trouble in searching for the stored data at all.

Sharing notes and other elements with your business partner or clients is very easy. By sharing a public URL, you can allow whomever you want, to gain access to the intended stuff.

Google Analytics

For an internet marketer, his website authenticates his presence over the web. By using advanced SEO techniques, a website can be made popular. However, it is never possible for you to determine how well your website is doing unless you have a tool to track your website's interaction with the visitors.

Google Analytics is the free web tool for helping you in this aspect. It will keep you informed about the various activities such as the number of visits to your website, the performance of the website in comparison with the goals and so on.

You can download the application on an iPhone or an Android-based phone.

Hootsuite

The online marketing business cannot flourish without social media presence. With the rise in the number of social media networks, you may find yourself struggling to keep all the social media accounts updated at all times. Hootsuite makes this task easier for you. 

This mobile app creates a single dashboard through which you can post business updates on every social media account easily. Hootsuite also has analytics feature, which helps you ascertain marketing campaigns on the social network.

Moreover, the links that you share with your online community through Hootsuite can be tracked for the number of visits and other elements.

Android-based phones, iPhones, and Blackberries can download this powerful app.

Raven Tools

Keeping track of different website marketing campaigns, blogs, and professional social networking accounts are an everyday job. At the same time, the job also proves to be very hectic.

Now, Raven Tools has been specially developed for iPhones. This app aims at integrating all your online web-marketing tasks. The major features of Raven Tools include management of social media accounts, supervision of content of blog and websites, and complete SEO organization like link building, and management of PPC campaigns.


Raven Tools has in total more than 30 features that can immensely help you keep your business in top shape.

What are the Most in Demand Digital Marketing Skills?


In the era of start-ups and entrepreneurs, digital marketing is one core solution that every marketer needs for a better performance of their organization. If you are one of those associated with a start-up or in any organization and are in the line of digital marketing, then are a specific set of skills that can help you improve your stand in the world of digital marketing. Here we discuss what are the most in demand skills required for a digital marketer and some other information associated with it.

Who is a digital marketer? The one who has the ability to understand the nuances of the new web paradigms and how they interact. It is about knowing every digital channel and their operations and interactions. So if you had a myth, that digital marketing limits itself to social media, then you got to understand that as a person associated with digital marketing, you should have in-depth knowledge about a lot of different areas that compile to make one known as digital marketing.


So, what skills make you a better digital marketer? Here is a list of some of the most in demand skills in the field of digital marketing. 

Analytics

Analysing web behavior is the first of the many tasks digital marketing has. Analytical marketers are supposed to leverage web behavior, device engagement, purchase history, and grow traffic and leads. Someone with a bent towards data analysis is considered as a hot commodity in this section.

Social Media

Social Media Marketing, an important part of digital marketing requires a digital marketer to have an understanding of different platforms and improve social strategies to add new networks. Staying on the edge help creating a trend that is a lot beneficial than following one.

Visualizing Data

It is a fact that the visuals are more shareable and increase traffic on the website. Digitals marketers are supposed to create interesting and unique visual content that drives more traffic to their website. The images that they create should excite people to share.

Copywriting

Content is and remains the king of digital marketing. So someone who can write interesting and engaging content can see a bright future in the field of digital marketing.

Technical Skills

The earlier phase of digital marketing may not define as technical skills as a must criteria for this field, but today with everyday changing technologies a knowledge about the technical side acts as an added advantage. Today two out of four new hires are expected to have technical knowledge.

SEO

Another most important part of digital marketing, SEO makes a prominent part of digital marketing. After social media, SEO is the most sought after skill here. According to a research by Moz andFractl SEO makes about 16% of the total job listings in digital marketing.  

Mobile Marketing

The increasing trend of mobile internet is forcing the organizations to focus more on mobile marketing. In fact, in 2015 the access through mobile has witnessed significant increase. This demands more expertise in the area of mobile marketing.


Today, organizations and businesses are looking for professionals who can help them stand out from others especially in this field. Hence if you are thinking of making a career in digital marketing you have to be sure that your resume flaunts each of these skill to the employer.

Job Titles You Can Look For

There are a number of job titles that you can look for when you looking for a job in the field of digital marketing. The most common job titles in this field are:

·         Digital Marketing Manager
·         Marketing Manager
·         SEO Specialist
·         Social Media Manager
·         SEO Manager
·         Content Strategist
·         Content Developer
·         Digital Marketing Analyst

The following graph shows the 20 most common job titles:



You could create jobalerts for these titles if you are planning to be a part of digital marketing industry.

Some More about Digital Marketing

There is one thing constant about digital marketing that is it changes all the time. Hence, keeping an update about every change is a prime responsibility of a person associated with digital marketing. Some of the latest trends in the field of digital marketing are:

·         Digital Marketing is not about sales
·         This year, have an increased focus on mobile
·         Have a social media strategy that is interactive and exciting
·         Increase use of visuals

These trends may be trending at the moment, but you cannot be certain what rules the internet in the coming six months. The future for sure is bright for the ones who have the skills and determination to work. Communication skills and a good personality adds on to the skills required to become a digital marketing person.

Want to EARN MONEY quickly?? 40 easy ways to make money quickly

  1. No-risk matched betting


    Hands down the quickest way to make a lot of money (well, without breaking the law). Lots of students have genuinely made £100s from this technique. It’s completely legal, risk free, tax free, and anyone can do it.
    It works by taking advantage of free bets regularly offered by betting sites through ‘matching’ them at a betting exchange. Matched betting eliminates the risk (you are betting both for and against a certain outcome).
    This leaves you being able to squeeze out the free bet, which can be as much as £200! Multiply this by how many betting sites there are and you can quite easily come away with a profit of a few hundred pounds.
    Owen walks you through how to make your first £15 profit (using a real life example) in this gem of a guide to matched betting. If you know of any better way to make £30/hr sitting at home, please let us know!
  2. Online surveys

    cat typingCredit: Julio Marquez – Flickr.com
    An increasingly popular way for students to make money is to fill out online surveys in their spare time. Research companies are always recruiting new members to answer surveys and test new products.
    For a few minutes of form filling, you can make a couple of quid which is paid as cash or rewards. You can bag up to £3 ($5) for some surveys!
    Also sign up for Swagbucks which rewards you for surveys as well as simply surfing the web, watching videos and playing games.
    Update: See our new full guide to the best paid online surveys!
  3. Paid for searching the web

    Interested in earning cash for doing what you already do online? This has to be one of the easiest methods of making money online without really any effort or change in your behavior.
    This innovative idea by Qmee.com rewards you for searching in Google, Bing or Yahoo. You just install a simple add-on to your browser and when you conduct a search there may be a few sponsored results alongside your normal search.
    qmee paid searchEach Qmee result has a cash reward attached – if you are interested in it simply click on it and collect your reward.
    The best thing is there is no minimum to cashout – our first one was just 72p wired to our Paypal account. You also have the option to donate it to charity.
    Sign up now for free and start earning from your own searches! Click here to start.
  4. Online market trading

    The historically hard-to-break world of investing in stock markets and currencies has been cracked wide open. Today there is no need to be a fat cat or fund the yachts of Wolf of Wall Street style stock brokers. You can do it all yourself with the help of online market trading platforms.
    Having spent many hours researching this new opportunity, I’ve been experimenting with the two biggest platforms: Plus500 and eToro.com.
    Both offer free practice accounts, and Plus500 also give you a free £20(without depositing, terms apply) for their CFD service which is worth taking up. Overall I prefer eToro with over 4.5 million users worldwide. It was recently featured in the BBC 2 documentary “Traders: Millions by the Minute” and the Financial Times.
    One of the best things on eToro is the CopyTrader feature. This lets you literally see, follow and copy the investments of other top performing traders.
    Follow George’s complete guide to trading on eToro to learn more. I think $200 is a good amount to get the most out of the learning curve by trying out a few different markets. If nothing else you’ll learn a great deal about various investments and industries.
    Disclaimer: CFD trading can be volatile and you can lose your entire capital, so don’t throw your life savings into it! Trading CFDs may not be suitable for you. Please ensure you fully understand the risks involved.
  5. Review websites & apps for cash

    Well it seems like you’re pretty nifty with a web browser, so perhaps it’s time to turn pro and browse websites as a paid and fun job!
    Introducing UserTesting.com – a new platform that pays everyday people to review all kinds of websites. Each review takes around 20 minutes and bags you $10 (£6.50) via Paypal.
    Simply sign up here, complete a test review and look forward to receiving websites in your inbox.
  6. The ‘Disney Vault’ secret

    To keep demand high across generations, Disney Studios carefully restrict the supply of some home release classics. They are locked away in the ‘vault’ for 8-10 years before being released for a short unspecified time.
    Buy them in this window at normal retail price and you can turn a nice profit when they go off sale for another decade or so.
    For example, in 2011 you could buy Beauty and the Beast on Blu-ray 3D for just £24.99. In just a couple of years it was on Amazon for a staggering £74.99!Importantly, not all Disney releases are subject to the vault and only the true classics will maintain such demand.
    Right now there are just 2 titles out of the vault which I would recommend snapping up. They are Bambi Diamond Edition Blu-ray and Cinderella Diamond Edition Blu-ray.
  7. ‘Get Paid To’ sites

    50 poundsSimilar to making money from online surveys, GPT sites reward you in cash and vouchers for completing various offers or activities online.
    The most popular sites today are Toluna,Swagbucks and InboxPounds.
    Exciting update! We’ll soon be launching our own GPT service for our readers. Invites will be limited and UK only, please join our mailing list if you’re interested in hearing once it’s live:
  8. Start your own website

    mark zuckerberg facebookIf you’ve ever seen the film The Social Network then you’ve most likely had your brain spinning as to what website you can start-up to make you billions.
    And of course there are lots of stories out there about successful students who have started a site while at university, or even bought a domain name and later sold it for £1000s.
    In fact, Save the Student is one such example of a website started at university by Owen Burek in his first year, which has since grown into a full-time and successful enterprise.
    Read Owen’s 4-step guide to setting up a website or this guide to making money as a blogger if you’re interested in finding out more. It’s really not that difficult to get started and there are plenty of opportunities to make money online.
  9. Write and publish a Kindle eBook

    If students are good at anything, it’s researching and writing. With theAmazon Kindle storeanyone can publish an eBook and make money.
    And the Kindle app is now available on almost any device (laptops, iPads, smartphones and yes, Kindles) so your global market is huge!
    List your book for £1.49 – £6.99 and you earn 70% of the sale. Considering Amazon is the ultimate selling machine (and remember people are looking to spend), that is a fantastic deal.
    kindle ebooksThe key to success with eBooks is to create value, and write non-fiction. Simply bundling information you have researched and complied on a common problem (eg. ‘secrets’ to finding a job) and then presenting it in an easy to digest format (an eBook) justifies someone spending a few quid on it.
    Another big tip is to have a great cover designed so it stands out, and once your book is live on the Kindle store it’s really important to get some reviews so it shows up higher in results. Encourage readers to leave an honest review at the end of your book.
    The best thing about this lucrative idea is that once you’ve invested the time (say 20 hours), you’ll earn a passive income for years to come! For a step-by-step guide to publishing and earning with eBooks, see “How to write a nonfiction eBook in 21 days“.
  10. Affiliate marketing

    If you’ve got a good presence on social media or perhaps you even have a blog or website, you can start bringing in money immediately by promoting all sorts of companies, products, services and offers online.
    Affiliate Window logoSign up to an affiliate network such as Affiliate Window, check their offers blog or browse the merchant listings to find something you think your friends would be interested in, grab your affiliate link and share it. If someone buys (can be within up to 90 days) using your link you’ll make a nice commission.
    To take it a step further, set up a website (read our guide) or a topical Facebook page and invite all your friends to join it and post your affiliate offers on there.
  11. Mobile phone recycling


    See how much you can get for your old mobile phone using our in-housemobile phone price comparison tool! Maybe ask your parents if they have any lying around too.
    You can get some good money and help the environment by recycling mobile phones with certain companies listed on the comparison tool. But be aware: you won’t always get the quoted cash since it depends on ‘condition’. We recommend Mobile Cash Mate for the fairest and highest payouts in most cases (they sent us a £203 cheque for an iPhone 5).
  12. Become a ‘Clickworker’

    The Clickworker.com concept is based on ‘internet crowd-sourcing’ where businesses advertise specific, scalable tasks they need completing quickly. And for us, it’s an easy way to make fast cash from our couch.
    There are a variety of tasks, but most commonly they involve mindless data entry, web research or form filling. You are rewarded and paid in cash (via Paypal) for the work you do, and you can choose for what and when you work. Give it a go. [If you’re US based, also try Amazon’s ‘Mechanical Turk‘].
  13. Claim tax back

    Many students work part-time or during the summer months, and others will be on placements or paid internships. More often than not, if you are a student working during the year, you will be overpaying income tax.
    Why? Simply because few students reach the personal tax-free income allowance each year but are put on an emergency basic tax-code by their employers meaning tax is being paid when it shouldn’t be.
    Use our student tax-back service to help you reclaim any tax you should not have paid. Just enter your details in the calculator here to work out what you may be owed. Otherwise for more information read our guide on claiming tax back here.
  14. Get cashback when shopping


    I earned this much in 2 years
    This is not only a way to make money but also to save money as a student. If you look at it in a different way then you are making money with every purchase you would have made anyway, whether it be 10% or 0.5% cashback.
    There are a number of cashback sites out there which pay you the commission they otherwise would have earned.
    We recommend signing up with Top Cashback, Quidco.com & Swagbucks which are free and offer the best selection of retailers and exclusives.
  15. A part-time job

    bar jobsA part-time job is the obvious first choice, opted for by most students looking to supplement their student loan. It provides a pretty steady flow of income and can enable you to gain valuable work experience.
    However, depending on where you live, jobs are not always easy to find. Check local classifieds, our student job searchstudent job websites and your university careers service for vacancies.
    It’s also worth signing up with the Graduate Recruitment Bureau, a free service which will match you with both part-time jobs or graduate opportunities.
    Read our guide to finding a part-time job whilst studying for more tips.
  16. Gigs on Fiverr

    Fiverr pranksFiverr is now the world’s largest marketplace for people to make money selling small services (known as ‘gigs’).
    What you offer could be absolutely anything, from writing and translating,social media posting, playing pranks and teaching to creating music, voiceovers and short video clips for people all around the world!
    The default price is $5 (hence Fiverr..), but you can attach extra services to gigs for more money. Whilst it might not seem like much, it can quickly add up and there are plenty of examples of people making a really good living from the site. The key is to get a system in place which minimises the time spent on each gig.
    But there is another way to profit even more from Fiverr for potentially far less work. How? By simply reselling gigs elsewhere. For example, find a decent logo designer then reply to jobs on Upwork or even local classifieds. A $5 spend can easily become $50+, and it’s repeatable!
    If you’re not interested in selling at all there’s SO much good stuff you can get done for yourself. Have a browse and get inspired!
  17. Review music for money

    If you love music, make it your business by reviewing unsigned bands and artists online for cash with Slicethepie.
    It can take a while to build up your reputation but some users of the site have said that they earn £40 a month. This may not sound like much, but if it’s something you enjoy then it shouldn’t be hard work and is another thing for your CV. Money you earn will be in $US but anyone can sign up and review.
    slicethepieTo get started, head over to Slicethepie now or read our quick guide for more info.
  18. Sell your notes

    If you don’t mind sharing your notes with other students it’s a great way to generate a little extra cash. There are sites out there that you can upload your notes to, along with your price, and then when another student downloads them you get paid.
    Most of these sites like Stuvia & Notesale are free for you to list your notes but tend to take a cut of your profit in order to handle the marketing etc so that you don’t have to go out there and promote your notes yourself.
    You will most likely have to upload PDFs but it’s worth it for the return and you can submit handwritten notes but you’re likely to make more money if they’re typed up.
  19. Sell second-hand course books

    One great way to make money is to buy other students’ text books at the end of the year, and then sell them just after freshers’ week – when the new intake of students know that they need them!
    You can either advertise on campus or list them online very easily onAmazon.co.uk Marketplace (just bear in mind they take a commission on books sold).
    For more tips on selling items online click here.
  20. Competitions

    Entering competitions of course comes with no guarantees, but there is a growing community of so-called ‘compers’ in the UK consistently making up to £50,000 a year through all sorts of competitions.
    Types of competitions available to enter range from simple registration forms and Facebook page liking to answering questions correctly over the phone to being a TV game show contestant. Imagine you made it ontoDeal or No Deal instead of just watching it!
    Start by entering our very own monthly student competition (Like our Facebook page to see when our next one is)!
    Then head to our active competitions page to enter other free competitions that we have found. Just note that some of these sites may send you spam so use an alias email address and opt-out of as many of the offers as possible.
    For loads more tips on achieving success and making money from competitions, read our guide to entering competitions.

Friday 23 September 2016

Top 50 Java Collections Interview Questions And Answers : eCareerhub

We have already shared the most frequently asked java interview questions for experience candidates. Also shared the tricky coding interview questions in our previous posts. Today , we will learn about the top 50 java collections interview questions and answers. We will divide this post into three categories :

Beginner level (0-1 year experience (Freshers)) ,

Intermediate level (1-3 years experienced Java Developers)

Advanced level(3+ Experienced) java collections interview questions and answers

Note : Please prepare all the below questions . Interviewer may choose to ask any question. 

Beginner Level (0-1 yr): Java Collections Interview Questions  and Answers


Q1  What is Collection ? What is a Collections Framework ? What are the benefits of Java Collections Framework ?

Collection : A collection (also called as container) is an object  that groups multiple elements into a single unit.

Collections Framework : Collections framework provides unified architecture for manipulating and representing collections.

Benefits of Collections Framework :

1. Improves program quality and speed
2. Increases the chances of reusability of software
3. Decreases programming effort.

Q2 What is the root interface in collection hierarchy ? 

Root interface in collection hierarchy is Collection interface . Few interviewer may argue that 
Collection interface extends Iterable interface. So iterable should be the root interface. But you should reply iterable interface present in java.lang package not in java.util package .It is clearly mentioned in Oracle Collection  docs , that Collection interface is a member of the Java Collections framework.  For Iterable interface Oracle doc , iterable interface is not mentioned as a part of the Java Collections framework .So if the question includes  collection hierarchy , then you should answer the question as Collection interface (which is found in java.util package).

Q3 What is the difference between Collection and Collections ?

Collection is  an interface while Collections is a java class , both are present in java.util package and  part of java collections framework.

Q4 Which collection classes are synchronized or thread-safe ?

Stack, Properties , Vector and Hashtable can be used in multi threaded environment because they are synchronized classes (or thread-safe). 



Q5 Name the core Collection  interfaces ?

Java Collection Interfaces or Hierarchy



















                                                source of image :  By Ervinn at en.wikibooks [CC BY-SA 3.0 ], from Wikimedia Commons

The list of core collection interfaces are : just mention the important ones

Important : Collection , Set , Queue , List , Map

Other interface also in the list :  SortedSet, SortedMap , Deque, ListIterator etc.


Q6 What is the difference between List and Set ?

Set contain only unique elements while List can contain duplicate elements.
Set is unordered while List is ordered . List maintains the order in which the objects are added .

Q7 What is the difference between Map and Set ?

Map object has unique keys each containing some value, while Set contain only unique values.

Q8 What are the classes implementing List and Set interface ?

Class implementing List interface :  ArrayList , Vector , LinkedList ,

Class implementing Set interface :  HashSet , TreeSet


Q9 What is an iterator ?

Iterator is an interface . It is found in java.util package. It provides methods to iterate over any Collection.


Q10 What is the difference between Iterator and Enumeration ?

The main difference between Iterator and Enumeration is that Iterator has remove() method while Enumeration doesn't.
Hence , using Iterator we can manipulate objects by adding and removing the objects from the collections. Enumeration behaves like a read only interface as it can only traverse the objects and fetch it .

Q11 Which design pattern followed by Iterator ?

It follows iterator design pattern. Iterator design pattern provides us to navigate through the collection of objects by using a common interface without letting us know about the underlying implementation.

Enumeration is an example of Iterator design pattern.

Q12 Which methods you need to override to use any object as key in HashMap ?

To use any object as key in HashMap , it needs to implement equals() and hashCode() method .

Q13  What is the difference between Queue and Stack ?

Queue is a data structure which is based on FIFO ( first in first out ) property . An example of Queue in real world is buying movie tickets in the multiplex or cinema theaters.

Stack is a data structure which is based on LIFO (last in first out) property . An example of Stack in real world is  insertion or removal of CD  from the CD case.

Q14 How to reverse the List in Collections ?

There is a built in reverse method in Collections class . reverse(List list) accepts list as parameter.

Collections.reverse(listobject);

Q15 How to convert the array of strings into the list ?

Arrays class of java.util package contains the method asList() which accepts the array as parameter.
So,

String[]  wordArray =  {"Love Yourself"  , "Alive is Awesome" , "Be in present"};
List wordList =  Arrays.asList(wordArray);


Intermediate Level (1-3 yrs): Java Collections Interview Questions  and Answers


Q16 What is the difference between ArrayList and Vector ?

It is one of the frequently asked collection interview question , the main differences are
Vector is synchronized while ArrayList is not . Vector is slow while ArrayList is fast . Every time when needed, Vector increases the capacity twice of its initial size while ArrayList increases its ArraySize by 50%. find detailed explanation   ArrayList vs Vector  .


Q17 What is the difference between HashMap and Hashtable ?

It is one of the most popular collections interview question for java developer . Make sure you go through this once before appearing for the interview .
Main differences between HashMap and Hashtable are :

a. HashMap allows one null key and any number of null values while Hashtable does not allow null keys and null values.
b. HashMap is not synchronized or thread-safe while Hashtable is synchronized or thread-safe .
find detailed explanation here Hashtable vs HashMap in Java

Q18 What is the difference between peek(),poll() and remove() method of the Queue interface ?

Both poll() and remove() method is used to remove head object of the Queue. The main difference lies when the Queue is empty().
If Queue is empty then poll() method will return null . While in similar case , remove() method will throw NoSuchElementException .
peek() method retrieves but does not remove the head of the Queue. If queue is empty then peek() method also returns null.

Q19 What is the difference between Iterator and ListIterator.

Using Iterator we can traverse the list of objects in forward direction . But ListIterator can traverse the collection in both directions that is forward as well as backward.

Q20 What is the difference between Array and ArrayList in Java ?

This question checks whether student understand the concept of static and dynamic array. Some main differences between Array and ArrayList are :
a. Array is static in size while ArrayList is dynamic in size.
b. Array can contain primitive data types while ArrayList can not contain primitive data types.
find detailed explanation ArrayList vs Array in Java


Q21 What is the difference between HashSet and TreeSet ?

Main differences between HashSet and TreeSet are :
a.  HashSet maintains the inserted elements in random order while TreeSet maintains elements in the sorted order
b. HashSet can store null object while TreeSet can not store null object.
find detailed explanation here TreeSet vs HashSet in Java


Q22 Write java code showing insertion,deletion and retrieval of HashMap object ?

Do it yourself (DIY) , if found any difficulty or doubts then please mention in the comments.

Q23 What is the difference between HashMap and ConcurrentHashMap ?

This is also one of the most popular java collections interview question . Make sure this question is in your to do list before appearing for the interview .
Main differences between HashMap and ConcurrentHashMap are :
a. HashMap is not synchronized while ConcurrentHashMap is synchronized.
b. HashMap can have one null key and any number of null values while ConcurrentHashMap does not allow null keys and null values .
find detailed explanation here ConcurrentHashMap vs HashMap in Java

Q24 Arrange the following in the ascending order (performance):
HashMap , Hashtable , ConcurrentHashMap and Collections.SynchronizedMap 

Hashtable  <  Collections.SynchronizedMap  <  ConcurrentHashMap  <  HashMap

Q25 How HashMap works in Java ?

This is one of the most important question for java developers. HashMap  works on the principle of Hashing . Find detailed information here to understand what is hashing and how hashmap works in java .

Q26 What is the difference between LinkedList and ArrayList in Java ?

Main differences between LinkedList and ArrayList are :
a. LinkedList is the doubly linked list implementation of list interface , while , ArrayList is the resizable array implementation of list interface.
b. LinkedList can be traversed in the reverse direction using descendingIterator() method  provided by the Java Api developers , while , we need to implement our own method to traverse ArrayList in the reverse direction . find the detailed explanation here ArrayList vs LinkedList in java.



Q27 What are Comparable and Comparator interfaces ? List the difference between them ?



We already explained what is comparable and comparator interface in detail along with examples here,  Comparable vs Comparator in Java

Q28 Why Map interface does not extend the Collection interface in Java Collections Framework ?

One liner answer : Map interface is not compatible with the Collection interface.
Explanation : Since Map requires key as well as value , for example , if we want to add key-value pair then we will use put(Object key , Object value) . So there are two parameters required to add element to the HashMap object  . In Collection interface add(Object o) has only one parameter.
The other reasons are Map supports valueSet , keySet as well as other appropriate methods which have just different views from the Collection interface.

Q29 When to use ArrayList and when to use LinkedList in application?

ArrayList has constant time search operation O(1) .Hence, ArrayList is preferred when there are more get() or search operation .

Insertion , Deletion operations take constant time O(1) for LinkedList. Hence, LinkedList is preferred when there are more insertions or deletions involved in the application.


Q30 Write the code for iterating the list in different ways in java ? 

There are two ways to iterate over the list in java :
a. using Iterator
b. using for-each loop

Coding part : Do it  yourself (DIY) , in case of any doubts or difficulty please mention in the comments .
Advance Level (3+ yrs): Java Collections Interview Questions  and Answers


Q31 How HashSet works internally in java ?

This is one of the popular interview question . HashSet internally uses HashMap to maintain the uniqueness of elements. We have already discussed in detail hashset internal working in java.

Q32 What is CopyOnWriteArrayList ?  How it is different from  ArrayList in Java?

CopyOnWriteArrayList is a thread safe variant of ArrayList   in which all mutative operations like add , set are implemented by creating a fresh copy of the underlying array.
It guaranteed not to throw ConcurrentModificationException.
It permits all elements including null. It is introduced in jdk 1.5 .


Q33  How HashMap works in Java ?

We are repeating this question , as it is one of the most important question for java developer.HashMap works on the principle of Hashing . please find the detailed answer here hashmap internal working in java .

Q34 How remove(key) method works in HashMap ?

This is the new question which is getting popular among java interviewers . We have shared the detailed explanation here how remove method works internally in java.

Q35 What is BlockingQueue in Java Collections Framework? 

BlockingQueue implements the java.util.Queue interface . BlockingQueue supports  operations that wait for the queue to become non-empty when retrieving an element , and wait  for space to become available in the queue when storing an element .
It does not accept null elements.
Blocking queues are primarily designed for the producer-consumer problems.
BlockingQueue implementations are thread-safe and can also be used in inter-thread communications.
This concurrent Collection class was added in jdk 1.5


Q36 How TreeMap works in Java ?

TreeMap internally uses Red-Black tree to sort the elements in natural order. Please find the detailed answers here internal implementation of TreeMap in java .

Q37 All the questions related to HashSet class can be found here ,  frequently asked HashSet interview questions

Q38 What is the difference between Fail- fast iterator and Fail-safe iterator ? 

This is one  of the most popular interview question for the higher experienced java developers .
Main differences between Fail-fast and Fail-safe iterators are :
a. Fail-fast throw ConcurrentModificationException while Fail-safe does not.
b. Fail-fast does not clone the original collection list of objects while Fail-safe creates a copy of the original collection list of objects.
The difference is explained in detail here fail-safe vs fail-fast iterator in java.


Q39 How ConcurrentHashMap works internally in Java?

The detailed answer is already explained here  internal implementation of concurrenthashmap 

Q40 How do you use a custom object as key in Collection  classes like HashMap ?

If one is using the custom object as key then one needs to override equals() and hashCode() method
and one also need to fulfill the contract.
If you want to store the custom object in the SortedCollections like SortedMap then one needs to make sure that equals() method is consistent to the compareTo() method. If inconsistent , then collection will not follow their contracts ,that is , Sets may allow duplicate elements.


Q41 What is hash-collision in Hashtable ? How it was handled in Java?

In Hashtable , if two different keys have the same hash value then it lead to hash -collision. A bucket of type linkedlist used to hold the different keys of same hash value.

Q42 Explain the importance of hashCode() and equals() method ? Explain the contract also ?

HashMap object uses Key object hashCode() method and equals() method to find out the index to put the key-value pair. If we want to get value from the HashMap same both methods are used . Somehow, if both methods are not implemented correctly , it will result in two keys producing the same hashCode() and equals() output. The problem will arise that HashMap will treat both output same instead of different and overwrite the most recent key-value pair with the previous key-value pair.
Similarly all the collection classes that does not allow the duplicate values use hashCode() and equals() method to find the duplicate elements.So it is very important to implement them correctly.

Contract of hashCode() and equals() method

a.  If  object1.equals(object2) , then  object1.hashCode() == object2.hashCode() should always be true.

b. If object1.hashCode() == object2.hashCode() is true does not guarantee object1.equals(object2)

Q43 What is EnumSet in Java ?

EnumSet  is a specialized Set implementation for use with enum types. All of the elements in an enum set must come from a single enum type that is specified explicitly  or implicitly , when the set is created.
The iterator never throws ConcurrentModificationException and is weakly consistent.
Advantage over HashSet:
All basic operations of EnumSet execute in constant time . It is most likely to be much faster than HashSet counterparts.
It is a part of Java Collections Framework since jdk 1.5.

Q44 What are concurrentCollectionClasses? 

In jdk1.5 , Java Api developers had introduced new package called java.util.concurrent that have thread-safe collection classes as they allow collections to be modified while iterating . The iterator is fail-safe that is it will not throw ConcurrentModificationException.
Some examples of concurrentCollectionClasses are :
a. CopyOnWriteArrayList
b. ConcurrentHashMap

Q45 How do you convert a given Collection to SynchronizedCollection ?

One line code :    Collections.synchronizedCollection(Collection collectionObj) will convert a given collection to synchronized collection.

Q46  What is IdentityHashMap ?

IdentityHashMap

IdentityHashMap is a class present in java.util package. It implements the Map interface with a hash table , using reference equality instead of object equality when comparing keys and values.In other words , in IdentityHashMap two keys k1 and k2 are considered equal if only if (k1==k2).
IdentityHashMap is not synchronized.
Iterators returned by the iterator() method are fail-fast , hence , will throw ConcurrentModificationException. 

Q47 What is  WeakHashMap ? 


WeakHashMap :

WeakHashMap is a class present in java.util package similar to IdentityHashMap. It is a Hashtable based implementation of Map interface with weak keys. An entry in WeakHashMap will automatically be removed when its key is no longer in ordinary use. More precisely the presence of a mapping for a given key will not prevent the key from being discarded by the garbage collector.
It permits null keys and null values.
Like most collection classes this class is not synchronized.A synchronized WeakHashMap may be constructed using the Collections.synchronizedMap() method.
Iterators returned by the iterator() method are fail-fast , hence , will throw ConcurrentModificationException. 

Q48 How will you make Collections readOnly ?

We can make the Collection readOnly by using the following lines code:

General : Collections.unmodifiableCollection(Collection c)

Collections.unmodifiableMap(Map m)
Collections.unmodifiableList(List l)
Collections.unmodifiableSet(Set s)

Q49  What is UnsupportedOperationException?

This exception is thrown to indicate that the requested operation is not supported.
Example of UnsupportedOperationException:
In other words, if you call add() or remove() method on the readOnly collection . We know readOnly collection can not be modified . Hence , UnsupportedOperationException will be thrown.

Q50 Suppose there is an Employee class. We add Employee class objects to the ArrayList. Mention the steps need to be taken , if I want to sort the objects in ArrayList using the employeeId attribute present  in Employee class. 

a. Implement the Comparable interface for the Employee class and now to compare the objects by employeeId we will override the emp1.compareTo(emp2)
b. We will now call Collections class sort method and pass the list as argument , that is ,
     Collections.sort(empList)  

If you want to add more java collections interview questions  and answers or in case you have any doubts related to the Java Collections framework , then please mention in the comments.

YouTube

Popular Posts