Java Socket Programming (Client Server Program)

In this tutorial I have shared simple client server program example to explain java socket programming. In this example I will use Socket and ServerSocket classes for connection oriented socket programming. Since data is shared between server and client over network in the form of streams so DataInputStream and DataOutputStream classes are used. Java Socket Programming (Client […]

Java Socket Programming (Client Server Program) Read More »

Difference between Method Overloading and Method Overriding in Java

Here you will learn about difference between method overloading and method overriding in java with program examples. When a class have methods with same name but different arguments list then it is called method overloading. On the other hand if two classes (parent and child) have methods with same name and same arguments list then

Difference between Method Overloading and Method Overriding in Java Read More »

Java NullPointerException – Reasons for Exception and How to Fix?

In this tutorial you will learn about Java NullPointerException and ways to fix this. A runtime error that can be handled by the programmer is called an Exception. Some exceptions that are checked at compile time are called Checked Exceptions, these also called compile time errors. But the term we are using Exception only refers

Java NullPointerException – Reasons for Exception and How to Fix? Read More »

Difference between ArrayList and LinkedList in Java

Here you will learn about difference between arraylist and linkedlist in java i.e. arraylist vs linkedlist. Both ArrayList and LinkedList are similar in many ways like both implement List interface and are non-synchronized. But still there are various differences between them which I have discussed below. Also Read: Difference between ArrayList and Vector in Java Image

Difference between ArrayList and LinkedList in Java Read More »

Java Program to Find Largest Number in Array Using Recursion

Here you will get java program to find largest number in array using recursion. public class LargestNumber { public static void main(String args[]) { int a[] = {5, 12, 10, 6, 15}; System.out.println(“Given Array: “); for(int i = 0; i < a.length; ++i) System.out.print(a[i] + ” “); System.out.println(“\n\nLargest Number is ” + findLargest(a, a.length-1)); }

Java Program to Find Largest Number in Array Using Recursion Read More »