Java

Java is a simple, secured, high level, platform-independent, multithread, Object-oriented programming language.

 

It’s one of the most popular and widely used programming language, platform, and technology. Java is not only a language it is also a platform and technology.

 

Related Pages:-

Collections vs Concurrent Collections in Java

Collections vs Concurrent Collections in Java | Following are the limitations of traditional collection (java.util package):- Hence these traditional collection objects are not suitable for scalable for multithreaded applications. To overcome these problems concurrent collection was introduced in the 1.5 version. Sample program to demonstrate ConcurrentModificationException while working with the collection. While one thread is […]

Collections vs Concurrent Collections in Java Read More »

Regular Expression in Java

Regular Expression in Java | If we want to represent a group of strings according to a particular pattern then we can use regular expression. Java has provided Pattern and Matcher classes to work with regular expression. Pattern and Matcher classes are present in the java.util.regex package and they were introduced in the Java 1.4

Regular Expression in Java Read More »

Generics in Java

Generics in Java | The main objectives of generics are:- Type Safety Arrays are type safe i.e. we can give the guarantee for the type of element present inside the array. For example:- If our programming requirement is to hold only string type of objects then we can choose a string array. By mistake, if

Generics in Java Read More »

Top 10 Common Exceptions in Java

Top 10 Common Exceptions in Java | Based on who raises the exception all exceptions are divided into 2 categories:- JVM Exceptions:- The exceptions raised by JVM itself whenever a particular event occurs are called JVM exceptions. Examples:- ArithmeticException, NullPointerException, etc. Programmatic Exception: A programmer raises explicitly to indicate that something goes wrong is called

Top 10 Common Exceptions in Java Read More »

throw and throws In Java

throw and throws In Java | In the introduction of Exception Handling, we have seen various concepts including exception hierarchy, Checked vs Unchecked Exception, and Fully Checked vs Partially Checked Exception. Later we discussed how to handle the exception using the try-catch-finally block with different test cases. throw keyword in Java Exception in thread “main”

throw and throws In Java Read More »

try-catch-finally in Java

try-catch-finally in Java | In this post, we will discuss, how we can handle the exception using try-catch block and the role of the finally block. Also see:- Exception Handling in Java Without try-catch Statement1Exception in thread “main” java.lang.ArithmeticException: / by zeroat Test.main(Test.java:4) It is an abnormal termination. Output:- Statement19Statement3 It is normal termination. It

try-catch-finally in Java Read More »

Exception Handling in Java

Exception Handling in Java | In this post, we will discuss an exception, why it occurs, and how we can handle it. What is an exception? An unexpected unwanted event that disrupts the flow of the program is called an Exception. Example:- FileNotFoundException, ArrayIndexOutOfBoundException, and e.t.c. It is highly recommended to handle the exception. Purpose

Exception Handling in Java Read More »

Collections Class In Java

Collections Class In Java | The Collections class defines several utility methods for collection objects like sorting, searching, reversing, etc. Sorting Elements in the List Collection class defines the following 2 sort() methods:- Program to sort elements list according to the default natural sorting order. Program to sort elements of a list according to Customized

Collections Class In Java Read More »