ConcurrentHashMap is a class introduced in Java 1.5 Version which implements the ConcurrentMap interface. The ConcurrentHashMap is simply a concurrent version of the HashMap, the functionality is also similar to that of a HashMap except for the internal concurrency. In this article, we will get to know what is Java ConcurrentHashMap and it's usage, along with it we will also … [Read more...]
Difference between new operator vs newInstance() method in Java
In this article, we will learn the difference between new operator vs newInstance() method. In general, the new operator is used to create the object if you know the type of the object at the beginning itself, but if you don't know the type of the object at the beginning and if it is passed at the Runtime then we need to go with newInstance() method. … [Read more...]
5 Different Prime Number Program in Java | Prime Numbers between 1 to 100
What is a Prime Number? A Prime Number is a number which is greater than 1 and divisible by 1 and only itself. Some of the Prime Numbers are 2, 3, 5, 7, 11, 13, 17... In this Prime Number Program in Java, let's take a look into the different prime number programs. … [Read more...]
2 Different Magic Number in Java | Check whether a number is Magic Number or Not?
Before looking at the Magic number in Java, let's gets some basic understanding on a Magic number What is a Magic Number? A Magic Number is a text or numeric value which is used in the code which is used for some identification. Using such constant can help us distinguish the files among the many other file formats. … [Read more...]
Armstrong Number in Java | Print Armstrong Number between 1 to 1000
An Armstrong Number is a number which is equal to the sum of its owns digits, each of them raised to the power of the total number of digits. In this article, Let's write a program check whether the given number is Armstrong Number in Java. … [Read more...]
6 Different ways – Java Random Number Generator | Generate Random Numbers within Range
In the developer's world, it is a common task to generate a random number, in a situation like where we need to send an OTP to a user for authentication or need to generate secure SALT which will be used in cryptography, etc. In this Java Random Number generator article, we will learn how to generate random in Java and Generate random numbers in a specific range … [Read more...]
31 Pyramid Program in Java | Pyramid Pattern in Java
In this article, we will learn to print the different Pyramid Pattern in Java. The pattern programs will help you to master nested loops and recursion in Java. This is one among the popular Java interview questions for fresher. Let's look into the different Pyramid Program in Java … [Read more...]
Exception Handling in Java – Try, Catch, Finally, Throw and Throws
Exception Handling is one of the most important feature which all the Java developers should know. In this article we will learn What is an exception Types of Java Exceptions, Exception Hierarchy 5 Essential keywords in Java Exception Handling How to handle exceptions in Java with examples. … [Read more...]
35 Star Pattern Programs In Java | Pattern Program
In this article, we will learn to print the different Star Pattern Programs in Java. This is one of the popular Java pattern program interview question for fresher. The pattern program are the most recommended programs to enhance the logical thinking and for the better understanding of flow control. Lets look into the below possible Star Pattern Programs in Java which might … [Read more...]
Java RSA Encryption and Decryption Example | ECB Mode + 4096 Bits + OAEPWITHSHA-512ANDMGF1PADDING
RSA [Rivest Shamir Adleman] is a strong encryption and decryption algorithm which uses public key cryptography. RSA algorithm is an Asymmetric Cryptography algorithm, unlike Symmetric algorithm which uses the same key for both Encryption and Decryption we will be using two different keys. One key can be given to anyone [Public Key] and the other key should be kept private … [Read more...]
Java AES Encryption Example | CBC Mode + 128 Bits + PKCS5Padding
AES (Advanced Encryption Standard) is a strong encryption and decryption algorithm and more secure than its predecessors DES (Data Encryption Standard) and 3DES (Triple-DES). Since AES Encryption is an Symmetric algorithm we will be using the same Secret Key for both Encryption as well as Decryption. In this article, we will be discussing about AES (Advanced Encryption … [Read more...]
Copy Constructor in Java | Deep Copy And Shallow Copy
A Copy Constructor in Java is a special type of Constructor, which enables us to get a copy of an existing object. Copy Constructors can take only one parameter, which is a reference of the same class. In this article lets understand what is copy constructor and its uses. … [Read more...]
- 1
- 2
- 3
- 4
- Next Page »