Recent Updates: TIBCO RV FIX PROTOCOL JAVA TUTORIAL

Visit http://javarevisited.blogspot.com/ For Recent Updates.

This Blog Posts All Posts Directory Listings Articles

6 example to declare two dimensional array in Java

02/10/2016 07:23:00 AM

Declaring a two-dimensional array is interesting in Java as Java programming language provides many ways to declare a 2D array and each way have some special things to learn about. For example, It's possible to create a two-dimensional array in J > read more

How to remove all special characters from String in Java

02/09/2016 07:34:00 AM

You can use regular expression and replaceAll() method of java.lang.String class to remove all special characters from String. A special character is nothing but characters like ! #, % etc. Precisely, you need to define what is a special character fo > read more

Introduction of How Android Works for Java Programmers

02/09/2016 06:30:00 AM

Android development is a current buzz in Java programming world. It's the Android, which keeps Java in the forefront of the last couple of years. Now, How important is to understand or learn Android for Java programmers? Well, it depends on, if y > read more

java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer [Solution]

02/07/2016 02:47:00 AM

The error message clearly says that Java runtime is not able to find a class called ServletContainer for Jersey library. This is the Servlet class you have specified in the deployment descriptor of your application. It's similar to DispatcherSe > read more

How to get first and last character of String in Java - Example

02/04/2016 08:48:00 AM

You can get the first and last character of a String using charAt() method in Java. This method accepts an integer index and returns the corresponding character from String. Since Java String is backed by an array, their index is also zero-based, whi > read more

10 Example of find command in Unix and Linux

01/23/2016 09:30:00 AM

The find command is one of the versatile commands in UNIX and Linux  and I used it a lot in my day to day work. I believe having good knowledge of find command in UNIX and understanding of its different options and usage will increase your product > read more

9 difference between Array vs ArrayList in Java

01/22/2016 09:01:00 AM

Both array and ArrayList are two important data structure in Java and frequently used in Java programs. Even though ArrayList is internally backed by an array, knowing the difference between an array and an ArrayList in Java is critical for becoming > read more

How to declare and initialize a List (ArrayList and LinkedList) with values in Java

01/20/2016 13:30:00 PM

Initializing a list while declaring is very convenient for quick use, but unfortunately, Java doesn't provide any programming constructs e.g. collection literals, but there is a trick which allows you to declare and initialize a List at the same > read more

3 ways to loop over Set or HashSet in Java? Examples

01/19/2016 08:52:00 AM

Since Set interface or HashSet class doesn't provide a get() method to retrieve elements, the only way to take out elements from a Set is to iterate over it by using Iterator, or loop over Set using advanced for loop of Java 5. You can get the it > read more

10 examples of grep command in UNIX and Linux

01/18/2016 01:00:00 AM

grep command is one of the most frequently used UNIX command stands for "Global Regular Expression Print" like find, chmod or tar command in Unix. grep command in Unix operating system e.g. Linux, Solaris, BSD, Ubuntu or IBM AIX is used to search fil > read more

5 books to learn Spring framework and Spring MVC for Java Programmers

01/17/2016 07:24:00 AM

Spring and Spring MVC is one of the most popular Java frameworks and most of new Java projects uses Spring these days. Java programmer often asks questions like which books is good to learn Spring MVC or What is the best book to learn Spring framewor > read more

Solving java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet in Java Spring MVC Application

01/16/2016 04:00:00 AM

The  java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet error comes when you deploy a Spring MVC application into Tomcat or Jetty and Servlet container not able to found this class, which usually found in the spring > read more

Why JPA Entity or Hibernate Persistence Class Should Not be Final?

01/14/2016 08:27:00 AM

One of the interesting hibernate interview questions is, why you should not make a Hibernate persistent class final? I'll try to answer this question in this short blog post. Use of proxies is the core feature of Hibernate (one of the most popul > read more

4 Ways to find Nth highest salary in SQL - Oracle, MSSQL and MySQL

01/12/2016 08:33:00 AM

One of the most common SQL interview questions is to find the Nth highest salary of employee, where N could be 2, 3, 4 or anything e.g. find the second highest salary in SQL. Sometimes this question is also twisted as to find the nth minimum salary i > read more

Top 20 Amazon and Google Programming Interview Questions

01/11/2016 07:36:00 AM

Hello, In this article I am going to sharing some frequently asked programming job interviews from technical giants and startups. If you are going for a programming job interview with Microsoft, Google or Amazon, you better be prepared for  all kind > read more

How to fix java.net.SocketException: Software caused connection abort: recv failed

01/09/2016 19:11:00 PM

Out of many client servers related socket errors here is one more interesting socket related error from Java program, "java.net.SocketException: Software caused connection abort: recv failed". The key point in this error message is "abort" and "recv > read more

Reading/Writing to/from Files using FileChannel and ByteBuffer in Java

01/08/2016 19:40:00 PM

In the past, I have talked about RandomAccessFile and how it can be used for doing faster IO in Java, and  in this Java NIO tutorial, we are going to see how to use read/write data from using FileChannel and ByteBuffer. Channel provides an alternate > read more

How does Java HashMap or LinkedHahsMap handles collisions?

01/07/2016 09:51:00 AM

Prior to Java 8, HashMap and all other hash table based Map implementation classes in Java handle collision by chaining, i.e. they use linked list to store map entries which ended in the same bucket due to collision. If a key end up in same bucket lo > read more

10 Examples of using ArrayList in Java - Tutorial

01/06/2016 06:07:00 AM

ArrayList in Java is most frequently used collection class after HashMap in Java. Java ArrayList represents an automatic re-sizeable array and used in place of array. Since we can not modify size of an array after creating it, we prefer to use Array > read more

How to check if String is not null and empty in Java?

01/05/2016 08:24:00 AM

In Java, since null and empty are two different concept, it's a little bit tricky for beginners to check if a String is both not null and not empty. A String reference variable points to null if it has not been initialized and an empty String is > read more

5 Resolutions for Java Programmers - 2016

01/04/2016 07:11:00 AM

First of all wish you very happy new year guys. It's that time of year when we start afresh, make plans, set goals and make resolutions for the new year. Being a Java developer and author of a Java blog, I frequently receive a request from Java p > read more

SQL EXISTS Example - Customers Who Never Order LeetCode Solution

01/03/2016 01:43:00 AM

Good morning Guys, Today we will learn how to use the EXISTS clause in SQL by picking up a nice SQL exercise from LeetCode. Suppose that a website contains two tables, the Customers table and the Orders table. Write an SQL query to find all customers > read more

java.net.SocketException: Failed to read from SocketChannel: Connection reset by peer

01/02/2016 00:17:00 AM

You might have seen the java.net.SocketException: Failed to read from SocketChannel: Connection reset by peer error while working with Java NIO based server which is using SocketChannel instead of InputStream for reading data from the network. In g > read more

3 Gifts for your Java Programmer Friends, Collegues or Relatives

01/01/2016 01:21:00 AM

Happy New year 2016 and Seasons greetings to everyone. May god bless you with success and whatever you want this year. This is festival time and I have a couple of friends asking me what to gift to a programmer friend or colleague? This is a common c > read more

The real difference between Process and Thread in Java

12/28/2015 09:00:00 AM

One of the common question from programming interviews is, what is the difference between a Thread and a Process? Well, the main difference between them  is that a Process is a program which is executing some code and a thread is an independent path > read more

VirtualBox - /sbin/mount.vboxsf: mounting failed with the error: Protocol error [Solution]

12/25/2015 01:02:00 AM

I use Oracle's virtual machine, Virtualbox to run the Linux operating system from my Windows machine. It's the most simple way to have two operating system in your laptop or PC. Since I run most of Java program in Linux, VirtualBox gives me a > read more

10 points about instanceof operator in Java with example

12/22/2015 09:06:00 AM

The instanceof operator in Java is used to check if an object belongs to a particular type or not at runtime. It's also a built-in keyword in Java programming language and mostly used to avoid ClassCastException in Java. It is used as safety-chec > read more

20 Java and Programming Quotes to Motivate Yourself

12/16/2015 09:52:00 AM

I always have a strong interest in knowing great peoples of my field i.e. programming. Knowing about them, following them and reading them not only gives you immense knowledge but the motivation you need to excel in what you are doing. It's motiv > read more

When to use intern() method of String in Java?

12/14/2015 08:41:00 AM

String.intern() method can be used to to deal with String duplication problem in Java. By carefully using the intern() method you can save a lot of memories consumed by duplicate String instances. A string is duplicate if it contains the same content > read more

How to split a comma separated String in Java? Regular Expression Example

12/10/2015 08:15:00 AM

You can use String.split() function or StringTokenizer class to split a comma separated String in Java. Since splitting a String is a very common functionality, Java designers have provided a couple of split() method on java.lang.String class itself. > read more

5 Good Books for Java JEE Programming Job Interviews

12/08/2015 07:54:00 AM

If you are preparing for Java interviews then apart from blogs and articles, you should also take help of books specially written for Java interviews. Though nothing can substitute true job experience but the interview is little bit different beast. > read more

Top 30 Microsoft Interview Questions for Software Development Engineers (SDE)

12/04/2015 08:15:00 AM

In this article, I am going to some frequently asked Microsoft Interview Questions for their Software Development Engineer role. I am mostly sharing technical questions which are based upon Data structure and Algorithms, and Software design. They don > read more

Why Programmers should take their CV seriously? 5 Tips to Make Better Resume

12/02/2015 09:03:00 AM

Recently I received an email from one of my readers that he is not getting enough interview calls though he was applying to every possible job he could from Job portals like Monster.com and Naukri.com. I asked him to send his resume to me and within > read more

2nd highest salary in Oracle using ROW_NUMBER and RANK in Oracle and MSSQL

11/30/2015 06:31:00 AM

This is the second article about calculating 2nd highest salary in SQL. In the first part, you have learned how to find the second highest salary in MySQL, SQL SERVER and by using ANSI SQL, which should also work in all database which confirms ANSI s > read more

How to find PID of process listening on a port in Linux? netstat and lsof command examples

11/07/2015 09:08:00 AM

In Linux, many times, you want to find out the PID of a process which are listening on a port e.g. if multiple tomcat servers are running on a host then, how do you find the PID of the tomcat listening on port 8080? There are many UNIX commands to fi > read more

Top 20 Core Java Interview Questions and Answers from Investment Banks

11/05/2015 10:09:00 AM

Core Java Interview Question Answer This is a new series of sharing core Java interview question and answer on Finance domain and mostly on big Investment bank.Many of these Java interview questions are asked on JP Morgan, Morgan Stanley, Barclays or > read more

5 Free OCAJP8, OCPJP8 Mock Exams and Practice questions - 1Z0-808 809 (Java 8 Certification)

11/04/2015 06:18:00 AM

In order to do well on Java certifications, you need good books and a reasonable number of practice questions before you go for exams. Practice questions and mock exams will help you to assess your topic-wise preparation level and help you to identif > read more

How to find length of String in SQL SERVER? LEN() Function Example

11/02/2015 08:44:00 AM

You can use LEN() function to find the length of a String value in SQL Server, for example, LEN(emp_name) will give you the length of values stored in the column emp_name. Remember this is different than the length of the actual column which you spec > read more

How to send HTTP request from UNIX or Linux? Use curl or wget command

10/29/2015 10:13:00 AM

You can use either curl or wget command to send HTTP request from UNIX or Linux operating system. Both commands allow you to send GET and POST request, which means you can also call REST web services.  I have a Java web application, which runs on Li > read more

How to replace NULL with Empty String in SQL SERVER? ISNULL and COALESCE Examples

10/26/2015 09:02:00 AM

We often need to replace NULL values with empty String or blank in SQL e.g. while concatenating String. In SQL SERVER, when you concatenate a NULL String with another non-null String the result is NULL, which means you lose the information you alread > read more

Code Academy now has a FREE course to Learn Java for Beginners

10/24/2015 02:05:00 AM

Code Academy has now released their full Java course and within days almost 60K+ students has already registered. Does it say anything about the popularity of Java? Given Java provides the really good prospect of getting a job and there are more than > read more

How to implement Binary Search tree in Java? Example

10/23/2015 09:03:00 AM

A binary search tree or BST is a popular data structure which is used to keep elements in order. A binary search tree is a binary tree where the value of a left child is less than or equal to the parent node and value of the right child is greater th > read more

133 Java Interview Questions Answers From Last 5 Years - The MEGA List

10/19/2015 09:37:00 AM

Time is changing and so is Java interviews. Gone are the days, when knowing the difference between String and StringBuffer can help you to go till the second round of interview, questions are becoming more advanced and interviewers are asking more de > read more

FIX Log Viewer - Tool to view FIX messages in Readable format

10/15/2015 11:00:00 AM

It's been a long time, I wrote anything related to FIX protocol, my last article was about FIX protocol dictionaries, also known as Fixtionnary, one of the most important tools of the trade for Java developers and support personnel working in FIX > read more

What is Double Brace Initialization in Java? Anti Pattern Example

10/12/2015 09:41:00 AM

Double brace initialization is a Java idiom to initialize a Collection like a list, set and map at the time of declaration. At times, you need a list of fixed elements e.g. supported products, supported currencies or some other config, and on the spo > read more

SQL Server JDBC Error: The TCP/IP connection to the host Failed

10/09/2015 10:28:00 AM

I had installed SQL SERVER 2014 Express edition and I was trying to connect to SQL SERVER from Java program using JDBC, but I was repeatedly getting following error:com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host lo > read more

20 Questions You can ask to Interviewer in Programming Job Interviews?

10/07/2015 09:11:00 AM

From the first round to HR round, from telephonic to face-to-face, in almost all kind of programming interviews, there will be a time when Interviewer will give you chance to ask questions. Many programmers are too concern about asking questions, and > read more

Share Your Interview Experience with Javarevisited

10/05/2015 08:13:00 AM

Hello Guys,How are you? Hope you are doing well.It's been 5 years since I have started Javarevisited. In last five years, I have worked hard to make Javarevisited a good resource to prepare for Java interviews, and to make it even more useful, I > read more

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

10/02/2015 10:16:00 AM

You often need to convert java.util.Date to java.sql.Date if you are storing dates in database e.g. SQL SERVER or MySQL. Since JDBC has their own data types for date and time e.g. java.sql.Date, java.sql.Time and java.sql.TimeStamp to match with data > read more

How to reset ArrayList in Java - Clear vs RemoveAll

09/29/2015 10:02:00 AM

Many times we want to reset an ArrayList for the reusing purpose, by resetting we mean clearing it or removing all elements. There are two ways to reset an ArrayList in Java, by using clear() method or calling removeAll(). If your ArrayList is small > read more

Java 8 forEach() Loop Example

09/25/2015 10:18:00 AM

Java 8 has introduced a new way to loop over a Collection, by using the forEach() method of the new Stream class. You can iterate over any Collection e.g. List, Set or Map by converting them into a java.util.sttream.Stream instance and then calling f > read more

How to read File into String in Java 7, 8 with Example

09/22/2015 10:35:00 AM

Many times you want to read contents of a file into String, but, unfortunately, it was not a trivial job in Java, at least not until JDK 1.7. In Java 8, you can read a file into String in just one line of code. Prior to the release of new File IO API > read more

Eclipse - java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet in Tomcat

09/18/2015 22:54:00 PM

Problem : You are getting java.lang.ClassNotFoundException exception complaining that Spring's DispatcherServlet class is not available in class path. This error is coming while running a Spring MVC based Java application from Eclipse and Tomcat > read more

Difference between Primitive and Reference variable in Java

09/16/2015 08:31:00 AM

There are two types of variables in Java, primitive and reference type. All the basic types e.g. int, boolean, char, short, float, long and double are known as primitive types. JVM treats them differently than reference types, which is used to point > read more

How to convert float to long or int in Java?

09/11/2015 02:05:00 AM

Yesterday one of the junior from my team came to me asking about how do you I convert a float variable into long or int? He was storing some values coming from other system in database and only wanted to store value before the decimal point e.g. he w > read more

What is @SuppressWarnings annotation in Java? Unchecked, RawTypes, Serial

09/08/2015 10:07:00 AM

@SuppressWarnings annotation is one of the three built-in annotations available in JDK and added along side @Override and @Deprecated in Java 1.5. @SuppressWarnings instruct compiler to ignore or suppress, specified compiler warning in annotated elem > read more

How to loop over two dimensional array in Java?

09/04/2015 08:48:00 AM

You can loop over two dimensional array in Java by using two for loops, also known as nested loop. Similarly to loop an n-dimensional array you need n loops nested into each other. Though its not common to see array of more than 3 dimension and 2D ar > read more

Difference between Java and C++ Constructor - Interview Question

09/02/2015 09:40:00 AM

If you are a C++ Programmer, now learning Java then you will find lot of similarity between two of the most popular object oriented programming languages e.g. both support Abstraction, Encapsulation, Class, Object and other OOP concepts. But, they ar > read more

Difference between SOAP and RESTful Web Service in Java

08/31/2015 09:03:00 AM

Though both SOAP and RESTful web services allows a client to query server for some information, but the way they are implemented and used is quite different. Main difference between SOAP and REST is that former provides an standard of communication b > read more

Eclipse - 2 ways to solve Unsupported major.minor version 51.0 error in Java

08/29/2015 02:47:00 AM

Unsupported major.minor version 51.0 error comes when you run a class file created using Java 1.7 (major version 51.0) into a lower JRE version e.g. JRE 6, 5 or 4. There are two ways to solve this problem, first make sure you run your Java program in > read more

How to calculate Large Factorials using BigInteger in Java?

08/26/2015 09:41:00 AM

Factorial of numbers greater than or equal to 13 cannot be found using primitive int data type as shown in our earlier factorial solution due to overflow. These factorials are too large to fit in an int variable, whose maximum value is just 21474836 > read more

Difference between HashMap, LinkedHashMap and TreeMap in Java

08/24/2015 08:19:00 AM

Map is one of the most important data structure from Java Collection Framework.  It provides hash table data structure functionality with it's rich implementations like HashMap, Hashtable, LinkedHashMap and little bit of sorting with TreeMap. So > read more

5 Entertaining Posts from StackOverFlow - Must Read

08/20/2015 09:25:00 AM

StackOverFlow is great place to look for help, learn and participate, but it's also a great place to taste some real entertainment, contributed by programmers from all over the world. Though, due to strict policies of stackoverflow.com, most of e > read more

11 Tips to become a better Interviewer? (Programming)

08/18/2015 09:38:00 AM

For a change this article is not for candidates who are preparing for interviews, but for those programmers who are responsible for taking interviews. At some point in your career as programmer, you will have responsibility to hire developers for you > read more

How to Find All Permutations of String in Java using Recursion

08/14/2015 10:53:00 AM

How to find all permutation of a String using recursion is one of the tricky coding question from Programming job interviews. I have first seen this question in my college exam, when we were asked to code the solution using C or C++ language. Since t > read more

Java 8 - Journey of for loop in Java, for(index) to forEach()

08/12/2015 08:18:00 AM

for loop has come a long way in Java 8 with new forEach() method in java.util.stream.Stream class. In this article we will take a look at journey of for loop in different versions of Java programming language. for loop is there from the very beginni > read more

Difference between Direct, Non Direct and Mapped ByteBuffer in Java

08/05/2015 09:06:00 AM

ByteBuffer is one of the important class of Java NIO API. It was introduced in java.nio package on JDK 1.4, it not only allows you to operate on on heap byte arrays but also with direct memory, which resides outside the JVM. There are mainly three ty > read more

How to revert back to Windows 8.1 from Windows 10 Update?

08/03/2015 09:12:00 AM

If you remember, I have updated to Windows 10 yesterday and blog about the problem I was facing with respect to clarity of text and blurriness on Chrome and Firefox browser e.g. text was turned white to some places and it wasn't pleasant working > read more

How to fix Chrome, Firefox Blurry, Over bright, fading after Windows 10 Update

08/01/2015 10:40:00 AM

Today morning, I updated My HP Laptop to Windows 10. First impression was great, crystal clear images, better wallpaper, better themes, better welcome screen and improved start menu and task bar at right hand corner. But when I open Chrome and Firefo > read more

Top 5 Data Structure and Algorithm Books - Must Read, Best of Lot

07/29/2015 09:01:00 AM

Data Structure and Algorithms books are often taught as text books in various universities, colleges and Computer Science degree courses, yet, when you put programmers in a situation, where they need to find and decide, which data structures and algo > read more

How to Calculate Difference between two Dates in Java (In Days)

07/27/2015 10:04:00 AM

If you are not running on Java 8, then there are two ways to calculate difference between two dates in Java in days, either by using standard JDK classes e.g. java.util.Date and java.util.Calendar or by using joda-time library. Unfortunately, Java > read more

java.sql.SQLException: No suitable driver found for jdbc:jtds:sqlserver - Cause and Solution

07/25/2015 08:49:00 AM

java.sql.SQLException: No suitable driver found for There are two ways to connect Microsoft SQL Server from Java program, either by using Microsoft's official JDBC driver (sqljdbc4.jar), or by using jTDS driver (jtds.jar). This error comes when > read more

3 Ways to Read File line by line in Java 8? Examples

07/23/2015 10:11:00 AM

Java 8 has added a new method called lines() in Files class which can be used to read a file line by line in Java. The beauty of this method is that it reads all lines from a file as Stream of String, which is populated lazily as the stream is consum > read more

How to Read XML File as String in Java? 3 Examples

07/21/2015 10:27:00 AM

Suppose you have an XML file and you just want to read and display the whole file as String in Java, may be for debugging purpose. If you are wondering how to do that in Java, well there are many ways to read XML as String in Java. You can do it in o > read more

How to convert String or char to ASCII values in Java

07/19/2015 05:48:00 AM

You can convert a character e.g. 'A' to its corresponding ASCII value 65 by just storing it into a numeric data type e.g. byte, int or long as shown below :int asciiOfA = (int) 'A';Here casting is not necessary, simply assigning chara > read more

Good time to become Java Certified Programmer - 20% discount on ALL Exams

07/17/2015 03:13:00 AM

In a nice gesture, Oracle has announced 20% discount on any Java certification to celebrate 20 years of Java. Which means, now you can get your Java SE certification at 20% discount, this is almost a saving of almost 50 USD. This is really exciting t > read more

How to find duplicate words in Java String? [Solution]

07/15/2015 10:39:00 AM

Problem :  Write a Java program to print the duplicate words from a given statement e.g. if given String is "Java and JavaScript are totally different, JavaScript follows Java" then your program should print "Java" and "JavaScript" because those two > read more

How to do GROUP BY in Java 8? Collectors.groupingBy() Example

07/13/2015 08:44:00 AM

Java 8 now directly allows you to do GROUP BY in Java by using Collectors.groupingBy() method. GROUP BY is a very useful aggregate operation from SQL. It allows you to group records on certain criteria. How do you group by in Java? For example, suppo > read more

How to solve java.lang.classnotfoundexception sun.jdbc.odbc.jdbcodbcdriver in Java 8

07/11/2015 23:21:00 PM

java.lang.classnotfoundexception sun.jdbc.odbc.jdbcodbcdriver exception comes in Java 8 because it has removed the JDBC ODBC bridge driver class "sun.jdbc.odbc.jdbcodbcdriver" from JDK and JRE. This class is required to connect any database using Obj > read more

Java ArrayList Tutorial

07/10/2015 08:36:00 AM

I have written lots of Java tutorials on ArrayList, covering many general purpose task e.g. how to create object of ArrayList and initialize to how to sort ArrayList in ascending and descending order etc. On request of my readers, I am creating this > read more

Strategy Design Pattern and Open Closed Principle in Java - Example

07/09/2015 09:00:00 AM

Strategy design pattern is based upon open closed design principle, the 'O' of famous SOLID design principles. It's one of the popular pattern in the field of object-oriented analysis and design along with Decorator, Observer and Factory > read more

5 Programming Languages Every Programmer Should Learn

07/08/2015 08:48:00 AM

I have read somewhere that programmer should learn a new programming language every year ( I think it's code complete, not sure though), but if you cannot do so, I suggest to at-least learn following five programming language to do well in your c > read more

Fibonacci series in Java without using Recursion

07/06/2015 08:26:00 AM

Fibonacci series is great example of Recursion and how use of recursion can result in clear and concise solution. That's why whenever asked about writing a Java program to get a Fibonacci numbers or print the Fibonacci series of certain numbers, > read more

java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver [Solution]

07/05/2015 05:36:00 AM

This error comes when you try to connect to Microsoft SQL Server database from Java program but the required JDBC driver is not available in Classpath or driver is available in CLASSPATH but class loader is not able to find it due classpath intricac > read more

How to Convert Fahrenheit to Celsius in Java with Example

07/03/2015 10:11:00 AM

In this Java tutorial, you will learn how to write a program to convert Fahrenheit to Celsius in Java. Fahrenheit is a thermodynamic temperature scale, where the freezing point of water is 32 degrees Fahrenheit (°F) and the boiling point of water is > read more

How to solve java.lang.UnsatisfiedLinkError: no ocijdbc11 in Java

07/02/2015 07:17:00 AM

"java.lang.unsatisfiedlinkerror no ocijdbc11 in java.library.path" error comes when you try to connect to Oracle 11g database using OCI (thick) driver by using tns name, but ocijdbc11.dll file is not available in PATH or java.library.path environme > read more

How to use wait, notify and notifyAll in Java - Producer Consumer Example

07/01/2015 09:15:00 AM

You can use wait, notify and notifyAll methods to communicate between threads in Java. For example, if you have two threads running in your program e.g.Producer and Consumer then producer thread can communicate to consumer that it can start consuming > read more

Difference between Dependency Injection and Factory Pattern in Java

06/30/2015 07:14:00 AM

TL;DR Main difference between dependency injection and factory pattern is that in case of former dependency is provided by third party (framework or container) while in case of later dependency is acquired by client class itself. Another key differen > read more

2 Ways to check If String is Palindrome in Java? Recursion and Loop

06/27/2015 22:53:00 PM

A String is said to be Palindrome if it is equal to itself in reverse order. You can use this logic to check if String is Palindrome or not. There are two common ways to find if a given String is Palindrome or not in Java, first by using for loop, al > read more

java.lang.ClassNotFoundException: org.postgresql.Driver - Cause and Solution

06/26/2015 10:01:00 AM

java.lang.ClassNotFoundException: org.postgresql.Driver error comes when you are trying to connect to a PostgreSQL database from Java program but Java ClassLoader is not able to find the Driver class "org.postgresql.Driver" required to make the conne > read more

5 Websites to Learn SQL Online for FREE

06/25/2015 09:26:00 AM

SQL is one of the most important skill for any programmer be it a Java, C++, PHP or Ruby developer. Almost 95% of the Java applications uses relational database in their back-end and almost all web applications uses database. In recent years, one of > read more

How to create HTTP Server in Java - ServerSocket Example

06/23/2015 09:20:00 AM

Java has a very good networking support, allows you to write client server application by using TCP Sockets. In this tutorial, we will learn how to create a simple HTTP Server in Java, which can listen HTTP request on a port let's say 80 and can > read more

2 Ways to Parse CSV Files in Java - BufferedReader vs Apache

06/22/2015 09:00:00 AM

In last tutorial, you have learned how to parse Excel file in Java and in this Java tutorial, you will learn how to parse CSV file in Java. You can directly parse CSV file in Java without using any third party library, because ultimately its a text f > read more

3 Ways to Find Duplicate Elements in an Array - Java

06/21/2015 10:05:00 AM

There are multiple ways to find duplicate elements in an array in Java and we will see three of them in this program. Solution and logic shown in this article is generic and applies to array of any type e.g. String array or integer array or array of > read more

Java Lock and Condition Example using Producer Consumer Solution

06/19/2015 10:29:00 AM

You can also solve producer consumer problem by using new lock interface and condition variable instead of using synchronized keyword and wait and notify methods.  Lock provides an alternate way to achieve mutual exclusion and synchronization in Jav > read more

How to use Callable and Future in Java? Example

06/17/2015 10:27:00 AM

Callable interface was added in Java 5 to complement existing Runnable interface, which is used to wrap a task and pass it to a Thread or thread pool for asynchronous execution. Callable actually represent an asynchronous computation, whose value is > read more

How to Connect to MySQL database in Java with Example

06/15/2015 09:45:00 AM

In this tutorial, You will learn how to connect to MySQL database from Java program and running SELECT and INSERT queries to retrieve and update data with step by step guide. In order to connect and access MySQL database from Java, you can use JDBC ( > read more

How to converts Java Object to XML - JAXB Example

06/12/2015 10:51:00 AM

JAXB, stands for Java API for XML Binding or sometimes Java Architecture for XML Binding is a decade old technology to directly convert a Java object into XML document (marshaling) and back to XML file into Java object(unmarshalling). It uses combina > read more

How to Read Write Excel file in Java - POI Example

06/10/2015 10:10:00 AM

In this Java Excel tutorial, you will learn how to read and write from Excel file in Java . You will learn steps to read/write both XLS and XLSX file format by using Apache POI library. In this example, we will particularly focus on reading and writi > read more

Top 30 Array Interview Questions and Answers for Programmers

06/08/2015 10:19:00 AM

Array is one of the most important topic for programming interviews. It doesn't matter if you are going to Google, Microsoft, Amazon or investment banks like Goldman Sachs, Barclays, Citi or even service based companies like IBM, Accenture, TCS, > read more



© 2006-2016 OnToplist.com, All Rights Reserved