Visit For Recent Updates.

This Blog Posts All Posts Directory Listings Articles

Difference between GETDATE() vs SYSDATETIME() vs GETUTCDATE() in SQL Server

10/20/2016 22:31:00 PM

One of the common question on Microsoft SQL Server interview is, what is the difference between GETDATE(), SYSDATETIME(), and GETUTCDATE(). Even though all three SQL Sever function returns the current date time in SQL Server, there are some subtle d > read more

Top 2 Books for OCPJP8 Certification - Java 8 1Z0-809, 810, 813 Exam

10/19/2016 22:55:00 PM

This is the second part of best books for Java 8 certifications. Since you need to pass two exams, OCAJP8 and OCPJP8 to become a Java SE 8 certified developer, I have shared some of the best OCAJP8 books in the last article. In this article, I will t > read more

2 Ways to find Tomcat and Java Version in Linux and Windows

10/18/2016 23:22:00 PM

You can find Tomcat and java version running on Linux either by executing the org.apache.catalina.util.ServerInfo class from catalina.jar or by executing shell script. The first solution will work on any operating system including Windows > read more

How to replace a substring in Java?

10/17/2016 22:46:00 PM

You can replace a substring using replace() method in Java. The String class provides the overloaded version of the replace() method, but you need to use the replace(CharSequence target, CharSequence replacement). This version of the replace() meth > read more

Base64 Encoding Decoding Example in Java 8

10/16/2016 21:56:00 PM

Until Java 8, there was no standard way to Base64 encode a String in Java or decode a base64 encoded String. Java Programmers either use Apache Commons library and it's Base64 class to encode or decode binary data into base 64 encoding, as shown > read more

Java Program to print pyramid pattern of stars and numbers

10/15/2016 22:29:00 PM

You can print Pyramid pattern of stars or numbers using loops and print methods in Java. There are two print method you need to know, System.out.print() and System.out.println(), the difference between print() and println() is that println adds a new > read more

Difference between mvn install, release and deploy in Maven

10/14/2016 21:55:00 PM

Even though there are a couple of powerful build and deployment tools exists for Java applications e.g. Gradle or ANT, It seems Maven is the king of them. I have used in several Java projects over the years and it was initially ANT, but now they all > read more

Best books to Learn Java 8

10/13/2016 22:15:00 PM

I often receive emails and queries asking about some good books to learn Java 8. Since Java 8 is very different from any other JDK release, in terms of language and API enhancement you really need a good book to learn fundamentals. In short, based up > read more

How to check if String contains another SubString in Java? contains() and indexOf() example

10/13/2016 10:15:00 AM

You can use contains(), indexOf() and lastIndexOf() method to check if one String contains another String in Java or not. If a String contains another String then it's known as a substring. The indexOf() method accept a String and return starting > read more

How to find square root of a number in Java - Algorithm Interview question

10/12/2016 01:57:00 AM

Write a program to calculate the square root of a number in Java or C++ is one of the popular coding interview questions from Programming job interviews both on tech companies like Facebook, Amazon, and investment banks like Citibank and Bank Of Amer > read more

How to check if a String is numeric in Java? Use isNumeric() or isNumber()

10/10/2016 21:43:00 PM

In day-to-day programming, you often need to check if a given String  is numeric or not. It's also a good interview question but that's a separate topic of discussion. Even though you can use a Regular expression to check if given String is > read more

How to check if ResultSet is empty in JDBC - Java Example

10/09/2016 21:00:00 PM

The JDBC ResultSet doesn't provide any isEmpty(), length() or size() method to check if its empty or not. Hence, when a Java programmer needs to determine if ResultSet is empty or not, it just calls the next() method and if next() return false it > read more

Post Order binary tree traversal in Java - Recursion and Iteration

10/08/2016 23:27:00 PM

This is the third article on tree traversal. In the last couple of articles, I have shown you how to implement preorder and inorder traversal in Java, both recursively and iteratively and today, you will learn about the post order traversal. Out of t > read more

How to split String in Java by WhiteSpace or tabs? Example Tutorial

10/07/2016 21:47:00 PM

You can split a String by whitespaces or tabs in Java by using the split() method of java.lang.String class. This method accepts a regular expression and you can pass a regex matching with whitespace to split the String where words are separated by s > read more

How to increase heap size of Eclipse - Solving OutOfMemoryError

10/06/2016 20:57:00 PM

If you are running lots of Java projects in Eclipse and it's throwing OutOfMemoryError every now and then it's time to increase the heap memory of Eclipse. Since Eclipse is a Java program, you can increase heap size of Eclipse by using JVM me > read more

How to convert java.util.Date to java.time.LocalDate in Java 8 - Example

10/05/2016 20:44:00 PM

The easiest way to convert a java.util.Date to java.time.LocalDate is via Instant, which is the equivalent class of java.util.Date in JDK 8. You can first convert util Date to Instant and then create a LocalDateTime object from that instant at your d > read more

How to Compare Date in SQL Server Query? Finding All Rows Between Two Dates

10/04/2016 20:59:00 PM

It's tricky to use dates in SQL server query, especially if you don't have good knowledge of how DateTime type works in SQL server. For example, one of the frequently asked SQL queries on the interview is to "select all rows where the date is > read more

How to check if two Rectangle Overlap in Java - Algorithm

10/03/2016 21:12:00 PM

Can you write a Java program to check if two rectangles are overlapping with each other or not? is one of the frequently asked coding questions on tech giants like Facebook, Amazon, Microsoft and others. This is also a kind of problem where it's > read more

3 ways to get number of months and year between two dates in Java?

10/02/2016 20:52:00 PM

Earlier I have talked about how to calculate a number of days between two dates in Java (see here), and now you will learn how to get the number of months and years between dates. Though it may look easy, it's not that easy to calculate months an > read more

5 Best books for OCAJP8 Exam 1Z0-808 - Java8

10/01/2016 22:10:00 PM

It's been more than 2 years since Java SE 8 was launched on 17th March 2014 and almost 2 years since we have OCAJP8 live. You might know that in order to become a Java SE 8 certified developer you need to pass two examples, the OCAJP8 (Exam 1Z0-8 > read more

3 Ways to Solve "No JVM installation found. Please install a 64-bit JDK" - Android Studio

09/30/2016 21:57:00 PM

You are an enthusiastic Java programmer who just learned about developing Android apps in Java. To start with you have installed Android Studio, which is the official Integrated Development Environment (IDE) for Android app development, based on Inte > read more

How to Serialize Object in Java - Serialization Example

09/29/2016 20:58:00 PM

Serialization is one of the important but confusing concept in Java. Even experienced Java developer struggle to implement Serialization correctly. The Serialiation mechamism is provided by Java to save and restore state of an object programatically. > read more

Iterative QuickSort Example in Java - without Recursion

09/28/2016 19:20:00 PM

The quicksort algorithm is one of the important sorting algorithms. Similar to merge sort, quicksort also uses divide-and-conquer hence it's easy to implement quicksort algorithm using recursion in Java, but it's slightly more difficult to wr > read more

Top 5 JSON Library Java JEE Developers Should Know

09/27/2016 20:40:00 PM

The JSON format is one of the most popular formats to transfer and exchange data in web. Almost all RESTful web services take JSON input and provide JSON output but unfortunately JDK doesn't have built-in support for one of the most common web st > read more

How to get just DATE or TIME from GETDATE() in SQL Sever

09/26/2016 20:20:00 PM

The GETDATE is one of the most popular built-in methods of  Microsoft SQL Server, but unlike its name suggest, it doesn't return just date, instead it returns date with time information e.g. 2015-07-31 15:42:54.470 , quite similar to our own j > read more

10 basic differences between Java and Groovy Programming

09/25/2016 20:39:00 PM

If you are working in Java, you might have heard about Scala, Groovy, and Closure. Out of these three Groovy seems to be gaining a place in Java projects more rapidly than others. Groovy is a Scripting language but runs on Java virtual machine. Every > read more

How to Remove CTRL-M characters From a File in UNIX and Linux

09/24/2016 22:21:00 PM

I wanted to transfer some files from Windows to Unix using FileZilla, but the problem arises when these files are transferred (Ascii or Binary mode both) and opened using VI we get ^M characters, also known as CTRL-M characters. I searched about this > read more

Top 21 Java Final Modifier (Keyword) Interview Questions and Answers

09/23/2016 22:12:00 PM

The final modifier is one of the important keywords in Java. You can use this with a class, method, and variable as well. A good knowledge of final keyword is not only essential for writing good, performant and secure Java programs but also to clear > read more

3 Maven Eclipse Tips for Java Developers

09/22/2016 21:38:00 PM

If you are using Maven inside Eclipse IDE via M2Eclipse plugin then following tips can help you a lot.1) Setup Dependency as Java Project in EclipseIf your POM dependencies is another project in Eclipse then your project will automatically get update > read more

How to Print all Leaf Nodes of Binary tree in Java - Recursion and Stack

09/22/2016 01:06:00 AM

Binary tree based questions are very common in Java or any other Programming job interviews. One of the frequently asked binary tree questions is "write a program to print all leaf nodes of a binary tree". In order to solve this problem, you must kno > read more

2 Reasons of org.springframework.beans.factory.BeanCreationException: Error creating bean with name [Solution]

09/11/2016 23:59:00 PM

The Spring framework is one of the most popular frameworks for developing Java application. Apart from many goodies, it also provides a DI and IOC container which initialize objects and their dependencies and assemble them together. The Java classes > read more

Best Book to Learn Java for C and C++ Programmer?

09/09/2016 22:08:00 PM

In the last 2 decade many Java programmers started programming with C and C++ but the situation is changed now, you have more choices e.g. you can choose Python or you can even start with Java. It seems Academia is preferring Python in USA and Java i > read more

Why use Spaces over Tabs for Indentation in Code Editors - Eclipse

09/08/2016 10:51:00 AM

When I started coding in Eclipse, I was not aware that by default Eclipse uses tabs for indentation and tabs can have varied with e.g. 1 tab can be equal to 2 spaces or 4 spaces or even 8 spaces. Sometimes, It's all up to you how you configure ta > read more

Java Comparable Interface and compareTo() Example

09/06/2016 06:56:00 AM

Hello, guys, today I am going to talk about one of the fundamental concepts in Java, defining the natural ordering of the objects e.g. lexicographical order for String and numerical order for Number classes e.g. Integer, Double, Float etc. The compar > read more

How to solve java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/test

09/03/2016 05:53:00 AM

The error "java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/test" occurs when you try to connect MySQL database running on your localhost, listening on port 3306 port from Java program but either you don't have MySQ > read more

Adapter Design Pattern in Java with Example

08/30/2016 09:04:00 AM

Adapter design pattern in Java, also known as the Wrapper pattern is another very useful GOF pattern, which helps to bridge the gap between two classes in Java. As per the list of Gang of Four patterns, Adapter is a structural pattern, much like Prox > read more

5 Free OCAJP 7 and OCPJP7 Mock Exams - Online Practice Test (1Z0-803 and 1Z0-804

08/27/2016 21:53:00 PM

Hello guys, today I am going to share a list of free OCAJP7 and OCPJP7 mock exams and online practice tests. If you are preparing for Java SE 7 Programmer 1 or 2 certification or upgrading your existing OCJP 6 exam then this will help you to gauge yo > read more

java.lang.numberformatexception for input string null - Cause and Solution

08/27/2016 02:45:00 AM

The java.lang.NumberFormatException comes when you try to parse a non-numeric String to Number e.g. Short, Integer, Float, Double etc. For example, if you try to convert . "null" to an integer then you will get NumberFormatException. The error "Excep > read more

5 Essential difference between Callable and Runnable interface in Java?

08/20/2016 03:06:00 AM

The difference between Callable and Runnable is one of the most frequently asked multi-threading and concurrency interview question in Java world. I remember, it was 2007 when I first heard about Callable interface and that too on a telephonic interv > read more

InOrder traversal of Binary tree in Java using Recursion and Iteration

08/17/2016 08:53:00 AM

This is the second article about tree traversal algorithms using Java. In the first part, we have seen the pre-order algorithm for visiting all nodes of the binary tree and today we'll learn about the InOrder traversal. As I told you before, unli > read more

Why Timestamp cannot be used in place of Date in Java?

08/15/2016 09:29:00 AM

One of the tricky question from Java Interview is, "Can we pass a Timestamp instance to a method expecting java.util.Date?", it's a tricky question because the answer is both Yes and No. You can, of course, pass a Timestamp object to a method wit > read more

How to Iterate through ConcurrentHashMap and print all keys and values in Java

08/08/2016 10:19:00 AM

Suppose you have a ConcurrentHashMap of String and Integer and you want to print all keys and values, how do you that? This is a common, day to day programming task for Java programmer and there are many ways to do it. The Map interface provides seve > read more

Top 10 Maven Plugins Every Java Developer Should Know

08/02/2016 11:10:00 AM

In the last couple of years, Maven has become the de-facto build tool for Java applications. Though there are challenges exists from tools like Gradle, but I think the dominance of Maven will help it to win the final battle. When I started with Maven > read more

How to find the 3rd element from end in linked list in Java

07/30/2016 23:35:00 PM

The problem to find the 3rd element from the end in a singly linked list or nth node from the tail is one of the tricky but frequently asked linked list problems in programming job interviews. The challenge here is to solve the problem in just one pa > read more

How to read a text file using Scanner in Java? Example Tutorial

07/24/2016 03:02:00 AM

As I told you before that there are multiple ways to read a file in Java e.g. FileReader, BufferedReader, and FileInputStream. You chose the Reader or InputStream depending upon whether you are reading text data or binary data, for example, the Buffe > read more

Difference between row_number(), rank() and dense_rank() in SQL Server, Oracle.

07/23/2016 09:32:00 AM

Though all three are ranking functions in SQL, also known as window function in Microsoft SQL Server, the difference between rank(), dense_rank(), and row_number() comes when you have ties on ranking i.e. duplicate records. For example, if you are ra > read more

How to calculate GCF and LCM of two numbers in Java? Example

07/18/2016 23:27:00 PM

This week's programming exercise is to write a Java program to calculate GCF and LCM of two numbers. The GCF, stands for Greatest common factor and LCM stands for Lowest common multiplier, both are popular mathematical operation and related to ea > read more

Difference in String pool between Java 6 and 7

07/15/2016 03:32:00 AM

String pool in Java is a pool of String literals and interned Strings in JVM for efficient use of String object. Since String is immutable in Java, it makes sense to cache and shares them in JVM. The String pool has gone through an important change i > read more

Binary Tree PreOrder Traversal in Java - Recursion and Iteration Example

07/11/2016 08:48:00 AM

Unlike linked list and array which can only be traversed linearly, there are several ways to traverse a binary tree. The tree traversal algorithms are mainly divided into two parts, depth first and breadth first. As their name suggests, in depth firs > read more

Eclipse - How to add/remove external JAR into Java Project's Classpath

07/09/2016 08:43:00 AM

There are multiple ways you can add an external JAR into the classpath of a Java project in Eclipse, but all goes via adding them into build path. Many beginner's struggles to add JARs into classpath and we will try to address that problem in thi > read more

How to remove duplicate rows from a table in SQL

07/07/2016 10:39:00 AM

There are a couple of ways to remove duplicate rows from a table in SQL e.g. you can use a temp tables or a window function like row_number() to generate artificial ranking and remove the duplicates. By using a temp table, you can first copy all uniq > read more

10 Examples to read a text file in Java

07/05/2016 10:08:00 AM

The Java IO API provides two kinds of interfaces for reading files, streams and readers. The streams are used to read binary data and readers to read character data. Since a text file is full of characters, you should be using a Reader implementation > read more

Printing Largest and Smallest of N numbers without using Array in Java

07/02/2016 23:31:00 PM

One of the common programming questions is, how do you find the largest and smallest number in N numbers without using arrays in Java? Can you write a program to solve this problem? Well, it's very similar to the problem we have seen before, find > read more

How to take array input in Java using Scanner - Example

07/02/2016 05:54:00 AM

There is no direct way to take array input in Java using Scanner or any other utility, but it's pretty easy to achieve the same by using standard Scanner methods and asking some questions to the user. For example, if you want to take a one-dimens > read more

Top 5 Books for Programming/Coding Interviews - Best of lot

06/29/2016 08:54:00 AM

If you are preparing for Programming Job interviews and looking for some of the best books for programming questions then you have come to the right place. In this article, I am going to share a couple of good books to prepare coding, software design > read more

How to convert java.sql.Date to java.util.Date in Java - JDBC Example

06/27/2016 09:00:00 AM

You often need to convert java.sql.Date to java.util.Date while interacting with databases from Java application. Since JDBC the Java API for database connectivity uses java.sql.Date to represent and most of the java code accepts java.util.Date, you > read more

How to close telnet terminal in Linux and Windows (quit, exit not working)

06/25/2016 23:16:00 PM

The telnet is one of the most useful networking commands, which is used to check if a server is listening on a particular port on the remote host, but it's a little bit tricky to use, especially, if you are not using it daily. Though I have used > read more

How to make Eclipse use spaces instead of tabs in Java editor

06/25/2016 01:01:00 AM

I use Eclipse IDE extensively to write Java programs for testing and example purpose, but when I copy those program in any text editors e.g. VIM, Notepad, TextPad or Edit plus, the indentation goes weird. I see a lot of white spaces which makes the p > read more

10 Examples of Joining String in Java 8 - StringJoiner and String.join()

06/22/2016 10:14:00 AM

It's quite common in day to day programming to join Strings e.g. if you have an array or List of String let's say {Sony, Apple, Google} and you want to join them by comma to produce another String "Sony, Apple, Google", there is not an easy w > read more

Why use Log4j logging vs System.out.println in Java

06/20/2016 11:00:00 AM

Printing messages to the console is an integral part of development, testing and debugging a Java program. If you are working on a Server side application, where you can not see what's going on inside the server, your only visibility tool is a lo > read more

How to install Maven on Windows 7,8 or 10?

06/19/2016 04:45:00 AM

There is no difference in installing Maven on Windows7, Windows 8, Windows 8.1 or Windows 10, you can follow the same steps to install Maven in any version Windows operating system. Installing Maven is very easy, just download the Apache Maven ZIP fi > read more

Maven Eclipse Error - "No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK"

06/18/2016 00:16:00 AM

If you are like many Java developer who uses Maven and Eclipse to build Java project using M2Eclipse plugin, you might have seen this error before. I ran into it recently when I ran the Maven Install command for one of the Java projects, configured a > read more

Top 5 Books to Learn Concurrent Programming and Multithreading in Java - Best, Must Read

06/15/2016 08:55:00 AM

Books are very important to learn something new and despite being in the electronic age, where books have lost some shine to internet and blogs, I still read and recommend them to get a complete and authoritative knowledge on any topic e.g. concurren > read more

How to add Primary key into a new or existing table in SQL Server

06/13/2016 09:49:00 AM

Since a primary key is nothing but a constraint you can use ALTER clause of SQL to add a primary key into existing table. Though it's an SQL and database best practice to always have a primary key in a table, many times you will find tables which > read more

2 Books to Prepare Java EE 6 Web Component Developer Certified Expert 1Z0-899 Exam (OCEJWCD)

06/11/2016 07:21:00 AM

Oracle launched "Java EE 6 Web Component Developer Certified Expert 1Z0-899 Exam" in 2011 to replace "Java Platform, Enterprise Edition 6 Java Server Pages and Servlet Developer Certified Expert Exam" and the "Oracle Certified Expert, Java Platform, > read more

How to Remove Duplicate Characters from String in Java

06/09/2016 09:59:00 AM

This week's coding exercise is to remove duplicate characters from String in Java. For example, if given String is "aaaaaa" then output should be "a", because rest of  the "a" are duplicates. Similarly, if the input is "abcd" then output should > read more

Java Object Oriented Analysis and Design Problem - Vending Machine Part 2

06/07/2016 09:28:00 AM

This is the second part of Java tutorial to show how to create Vending Machine in Java. In the first part, we have discussed problem statement and the solution itself, but unit testing and design document was still pending, which we'll see in thi > read more

Design a Vending Machine in Java - Interview Question

06/04/2016 22:06:00 PM

How do you design a Vending Machine in Java? is one of the good Java interview questions mostly asked at Senior level Java developer Interviews. In a typical coding interview, you will be given a problem statement to develop a vending machine and wit > read more

10 Example of lsof commands in UNIX and Linux

06/02/2016 08:05:00 AM

It's been a long time I have written anything on UNIX or Linux, but today I'll talk about the lsof command, a utility command every system admin and developer love. The lsof command stands for list open file descriptors and as the name sugge > read more

What are Idempotent and Safe methods of HTTP and REST

05/31/2016 09:23:00 AM

In order to efficiently work with REST and RESTful web service, good knowledge of HTTP is really helpful. Even though REST seems easy, designing a uniform and consistent RESTful API is a tough job. One of the tricky tasks is choosing right the HTTP m > read more

Minecraft - java.lang.UnsatisfiedLinkError: lwjgl64.dll : Access Denied Solution

05/29/2016 04:07:00 AM

You can resolve java.lang.UnsatisfiedLinkError: lwjgl64.dll : Access Denied error in Minecraft by disabling your anti-virus and run. Later you can whitelist the lwjgl64.dll, so that your anti-virus will not block it again. I have talked about > read more

How to reverse an ArrayList in place in Java - Example

05/28/2016 04:00:00 AM

You can reverse an ArrayList in place in Java by using the same algorithm we have used to reverse an array in place in Java. If you have already solved that problem then It's a no-brainer because ArrayList is nothing but a dynamic array, which ca > read more

Best practices to name your JAR file in Java

05/26/2016 08:31:00 AM

If you are an author of an internal, proprietary Java library or an external open source library,  or you are one of those lucky developers who ship Java application by yourself then you should follow these best practices while naming your JAR files > read more

5 Free Data Structure and Algorithm Books in Java Programming

05/23/2016 10:06:00 AM

In last article, I have shared 5 good data structure and algorithms books, but those were not free. After that article, I received some feedback about how about free data structure and algorithm books? Fair enough, everybody loves free eBooks, don > read more

How do you find length of a Singly Linked list using Loop and Recursion

05/21/2016 23:30:00 PM

Hi Guys,Here is one of the classical programming questions asked to me first time on an interview with multinational Investment bank. After that, this question has been asked to me on several occasions in other programming job interviews as well. Wha > read more

Java Mistake 3 - Using "==" instead of equals() to compare Objects in Java

05/21/2016 08:30:00 AM

In this part of Java programming mistakes, we will take a look at another common pattern, where programmers tend to use "==" operator to compare Objects, similar to comparing primitives. Since equality of object can be very different in the physical > read more

What is difference between Synchronized and Concurrent Collections in Java?

05/21/2016 02:30:00 AM

Synchronized vs Concurrent CollectionsThough both Synchronized and Concurrent Collection classes provide thread-safety, the differences between them comes  in performance, scalability and how they achieve thread-safety. Synchronized collections like > read more

How do you find length of a Singly Linked list using Loop and Recursion

05/21/2016 02:00:00 AM

Hi Guys,Here is one of the classical programming questions asked to me first time on an interview with multinational Investment bank. After that, this question has been asked to me on several occasions in other programming job interviews as well. Wha > read more

Command design Pattern in Java with Example

05/19/2016 08:38:00 AM

In simple words, Command design pattern is used to separate a request for an action from the object which actually performs the action. This decoupling between Invoker and Receiver object provides a uniform ways to perform different types of actions. > read more

Difference between float and double variable in Java?

05/16/2016 10:22:00 AM

Though both float and double datatype are used to represent floating point numbers in Java, a double data type is more precise than float. A double variable can provide precision up to 15 to 16 decimal points as compared to float precision of 6 to 7 > read more

Difference between close and deallocate cursor in SQL

05/12/2016 08:36:00 AM

Cursor in a database is used to retrieve data from the result set, mostly one row at a time. You can use Cursor to update records and perform an operation on a row by row. Given its importance on SQL and Stored procedure, Cursor is also very popular > read more

Top 10 Google Interview Questions for Software Engineer - Books, Resources

04/23/2016 07:30:00 AM

These Google interview questions are some of my favorites collected from different sources. Every Programmer knows that Google is one of the best technology company and its dream for many software developers to work for google, but at same time inter > read more

Difference between notify and notifyAll in Java - When and How to use

04/22/2016 13:30:00 PM

notify vs notifyAll in Java What is the difference between notify and notifyAll method is one of the tricky Java questions, which is easy to answer but once Interviewer asks follow-up questions, you either got confused or not able to provide clear-cu > read more

Difference between ExecutorService.submit() and Executor.execute() methods in Java?

04/19/2016 09:53:00 AM

What is the difference between Executor.submit() and Executor.execute() method in Java? is one of the good multi-threading questions for experienced Java programmers, mostly asked in Investment Banks like Barclays, Deutsche Bank, or Citibank. A main > read more

Difference between Oracle SQL Query vs Microsoft SQL Server 2008 or Sybase

04/10/2016 08:35:00 AM

Oracle and Microsoft SQL Server are two of the most popular database but they are very different with each other and if you are migrating SQL queries or database, tables from Oracle 11g database to Microsoft SQL Server 2008 then you are bound to face > read more

What is purpose of different HTTP Request Types in RESTful Web Service?

04/10/2016 03:49:00 AM

RESTful web services heavily rely on HTTP by design. They use different HTTP methods to perform their job and uses HTTP response code to inform clients about success or failure of a particular request. REST stands for Representational State transfer > read more

3 Ways to Solve jQuery - Uncaught ReferenceError: $ is not defined Error

04/09/2016 02:59:00 AM

If you are using jQuery, Angualr JS or plain old JavaScript and getting "Uncaught ReferenceError: $ is not defined" error which means $ is either a variable or a method which you are trying to use before declaring it using var keyword. In jQuery, it& > read more

How to Convert Result of SELECT Command to Comma Separated String in SQL Server

04/03/2016 04:38:00 AM

Sometimes, you need the result of SQL SELECT clause as a comma separated String e.g. if you are outputting ids of white-listed products. By default, the SELECT command will print each row in one line and you get a column of names or ids. If you need > read more

10 Examples of Converting a List to Map in Java 8

04/02/2016 08:19:00 AM

Suppose you have a List of objects, List and you want to convert that to a Map, where a key is obtained from the object and value is the object itself, how do you do it by using Java 8 stream and lambda expression? Prior to Java 8, you can do this by > read more

How to increase length of existing VARCHAR column in SQL Server

03/27/2016 04:12:00 AM

You can increase the length of a VARCHAR column without losing existing data in SQL Server. All you need to do is that execute following ALTER TABLE statements. Though, you need to specify NULL or NOT NULL constraint explicitly, depending upon your d > read more

How to find the first element of Stream in Java 8 - findFirst() Example

03/26/2016 04:31:00 AM

In Java 8, you can use the Stream.findFirst() method to get the first element of Stream in Java. This is a terminal operation and often used after applying several intermediate operations e.g. filter, mapping, flattening etc. For example, if you have > read more

Java 1.5 Generics Tutorial: How Generics in Java works with Example of Collections, Best practices, Gotchas

03/25/2016 08:30:00 AM

Java Generics TutorialGenerics in Java is one of important feature added in Java 5 along with Enum, autoboxing and varargs, to provide compile time type-safety. Generics is also considered to be one of the tough concepts to understand in Java and som > read more

Difference between Wait and Sleep, Yield in Java

03/25/2016 00:00:00 AM

The difference between wait and sleep or the difference between sleep and yield in Java are one of the popular core Java interview questions and asked on multi-threading interviews. Out of three methods which can be used to pause a thread in Java, sl > read more

Top 10 Servlet Interview Question Answers - J2EE

03/24/2016 22:30:00 PM

This time its servlet interview questions, I was thinking what to pick for my interview series and then I thought about J2EE and Servlet is my favorite on that space. Servlet is an important part of any J2EE development and serves as Controller on ma > read more

Difference between Stack and Heap memory in Java

03/24/2016 08:01:00 AM

The difference between stack and heap memory is common programming question asked by beginners learning Java or any other programming language. Stack and heap memory are two terms programmers starts hearing once they started programming but without a > read more

How Garbage Collection works in Java

03/23/2016 09:30:00 AM

I have read many articles on Garbage Collection in Java, some of them are too complex to understand and some of them don’t contain enough information required to understand garbage collection in Java. Then I decided to write my own experience as an > read more

Top 10 basic networking commands in linux/unix

03/22/2016 10:30:00 AM

Networking is an essential part Unix and it offer lots of tools and command to diagnose any networking problem. When I was working on FIX Protocol we get a lot of support queries to see whether FIX Sessions are connected or not. Since FIX Protocol us > read more

How to delete from table using JOIN in SQL Server

03/19/2016 23:59:00 PM

It's a little bit tricky to delete from a table while using any type of JOIN in SQL e.g. Inner Join, Left Outer Join, or Right Outer Join. The obvious syntax doesn't work as shown below:delete from #Expired e INNER JOIN Deals d ON e.DealId = > read more

How to Reverse an ArrayList in Java using Recursion - Example Tutorial

03/18/2016 22:41:00 PM

If you ever need to reverse a List in Java e.g. ArrayList or LinkedList, you should always use the Collections.reverse() method. It's safe and tested and probably perform better than the first version of the method you write to reverse an ArrayLi > read more

Java Synchronization Tutorial : What, How and Why?

03/17/2016 09:00:00 AM

Multithreading and synchronization are a very important topic for any Java programmer. Good knowledge of multithreading, synchronization, and thread-safety can put you in front of other developers, at the same time, it's not easy to master this c > read more

© 2006-2016, All Rights Reserved