Why StringBuffer/StringBuilder should be avoided in HashMap?

Why StringBuffer/StringBuilder should be avoided in HashMap?   This is one of the core java interview question under collections category. Generally in all the map manipulations we use string and avoid stringbuffer and stringbuilders, because both are mutable. What is the issue if is mutable ? If you are keeping your hashmap’s key/value as stringbuilder/stringbuffer then once after you inserted […]

156 total views, 1 views today

» Read more

Generate angular + Java code using yeoman & Jhipster

Generate angular + Java code using yeoman & Jhipster Ensure you have installed yeoman (yo when dealing with npm and yarn) and jhipster (generator-jhipster when dealing with npm and yarn). If not installed, have a quick look at,     Step 1: Run yo jhipster     It will ask around 10 to 15 questions, you can provide the sample […]

288 total views, 7 views today

» Read more

Core Java Programming Interview Questions

Core Java Programming Interview Questions: All these below are purely java programming interview questions collected from different attendees and different companies. Walk through all the programming questions and try to figure it out before checking the answers below.   Basics:   1.What is the output ? package in.javadomain; class Basics { public static void main(String[] args) { System.out.println(“I am main […]

280 total views, 1 views today

» Read more

Java program to check whether the String is Pangram or Not

Java program to check whether the String is Pangram or Not: What is Pangram ? If a given sentence has all the alphabets then it is a valid pangram.   If the below sentence is given as input then it has to return “Pangram” The quick brown fox jumps over the lazy dog   If the below sentence is given […]

359 total views, 4 views today

» Read more

Reflection Example for 100% Dummies

Reflection Example for 100% Dummies: I know in all the recent interviews reflection relation question are asked along with the other tough and popular core java interview questions mentioned here.   As mentioned in the title this is purely for 100% dummies who just heard only the term “Reflection”. I was also in the list of 100% dummies, after reading […]

199 total views, no views today

» Read more

Java Remote Debugging Web Application Steps

Java Remote Debugging Web Application Steps: Java web applications are complex to setup and do debugging all the time for all the issues. In those cases, we can smartly keep the code deployed currently in local and just do remote debugging to figure out the issues. It is much easy with IBM WebSphere or Eclipse. Step 1: Add these two […]

265 total views, no views today

» Read more

Java Collection Framework (As per Java 8) All Covered in One Image

Java Collection Framework (As per Java 8) All Covered in One Image: Even many experienced java developers know only list/set/map and few know vector hashtable and queues. But so much more than that are actually there in the java collection framework. I am publishing the single java collection framework image to understand the complete collection hierarchy interface/sub interface and its […]

316 total views, no views today

» Read more

Binary Search Implementation in Java Example

Binary search is one of the most important searching algorithm to know and understand for search functionality. In the below we are going to return the array position based on the searching number existence in the array, if it does not exist then we will return -1.   Binary search basically works this way, 1. Numbers should be sorted in […]

283 total views, 2 views today

» Read more

Singly Linked List Algorithm Implementation Java Example

Linked list is nothing but having the link of the next node with the current node, this gives lot of advantages like directly doing any manipulation on particular node instead of iterating everything for all the operations like we do in arraylist.   Why we need Linked List ?   Array does not help us for these things, so forced […]

446 total views, 2 views today

» Read more

Reversing a string using Stack Implementation

In our previous post, we saw how to create a custom stack implementation in java.¬†Today we are going to extend the same implementation to perform additional operations like reversing, checking empty or full etc. Approach 1: [Simple & Best Approach]   We have used the same Stack class from this post [Java Stack Implementation Simple Example]¬†with small modification like array […]

396 total views, 2 views today

» Read more
1 2 3 21