Core java
- 10 July
How to find prime factors of a number in java
In this post, we will see how to find prime factors of a number in java. A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. The prime factors of a number are all of the prime numbers that will exactly divide the given number. […]
- 09 July
java program to check prime number
This is easy question. It may not be asked you directly, but you can use this program to create many other complex program. A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. Program logic: If any number which is not divisible by any other […]
- 09 July
Palindrome program in java
In this article, we will see how to implement palindrome program in java. A palindrome is a word, phrase, number, or other sequence of symbols or elements that reads the same forward or reversed. For example: 12121 is palindrome as it reads same forward or reversed. madam is also a palindrome . This is very […]
- 07 July
Reverse a linked list in java
If you want to practice data structure and algorithm programs, you can go through data structure and algorithm interview questions. In this post, we will see how to reverse a linked list in java. This is one of popular interview question. Java Linked List Interview Programs: How to reverse a linked list in pairs How to […]
- 06 July
Find nth element from end of linked list
This is one of popular interview question. Java Linked List Interview Programs: How to reverse a linked list in java How to reverse a linked list in pairs How to find middle element of linked list in java How to detect a loop in linked list in java Find start node of loop in linkedlist […]
- 06 July
Find middle element of a linked list in java
If you want to practice data structure and algorithm programs, you can go through data structure and algorithm interview questions. This is one of the popular interview question. In this post, we will discuss how to find middle element in linkedlist in most efficient way. Java Linked List Interview Programs: How to reverse a linked list […]
- 05 July
How to detect loop in a linked list in java with example
If you want to practice data structure and algorithm programs, you can go through data structure and algorithm interview questions. One of the most popular interview question nowadays is “How to detect loop/cycle in LinkedList”. So I thought I should cover this question. This question is more related to data structure. You can also find start […]
- 22 June
Lambda Expressions in Java 8
1. Introduction Java 8 has introduced a new feature called Lambda expressions. This is considered to be major change for Java because it introduces a way of programming that is more about actions than the details of how things are done. Other languages such as Scala already have this feature so this is not new […]
- 21 June
Interface Default Methods in Java 8
1. Introduction In this post, We will introduce default methods in interface which are introduced in Java 8. Have you ever encountered a situation where you created an interface and several classes implemented it? Now, suppose you need to add new methods to the interface. Doing so would lead to a multitude of compilation errors across […]