List all directories of input path – scope operator & file filter in java
Given an input directory, List or print folders contained in a input directory path scope operator & file filter in java (IO operation /example)
Given an input directory, List or print folders contained in a input directory path scope operator & file filter in java (IO operation /example)
Given an input directory or folder, we would like to list all files & folders in a directory. We will
Given a property file defining the properties of a java application. Property file will be residing in the resource folder/directory.
What thread’s join method? The join method allows one thread to wait for the completion of another thread. Suppose we
List all system fonts and font families using GraphicsEnvironment. We will iterate through system fonts and we will print the
Given a java program, where we are allocating memory in heap store. We will allocate array (array of long primitives).
We will get list of all environment variables using System class. We will iterate through the map of system variables
In current post, we will print /displays locales, country codes, country names and country languages. We will use Locale class
Print or list or display all system properties using forEach method java 8 streams lambda. Print key value pairs of properties in java
Given an array of integers in java. Print second smallest element in an array (in single iteration). We have already discussed
Given an input string in java, convert input string to character array. We will iterate through char array to print each character.
StringBuffer is a thread-safe, mutable sequence of characters. StringBuffer can be modified at any point of time. We will look
Given a String in java, we would like to convert the input String to lower case & upper case. String
Difference between equality operator & equals method in java. == operator is used to compare primitives & equals method is used to compare objects (example)
Given an array of integers in java. Create two stacks using single array. We shall able to perform push &
Given an array of integers in java. Print second largest element in an array (in single iteration). Example – find second largest
Create stack in java using linked list. We will implement stack using java generics. We will create a stack class,
Create or implement stack in java using array as underlying data structure. We will create stack class having following methods
Given two arrays, one array is almost duplicate array of another array. Arrays are duplicated except one element. e.g. array1[] =
Given an array containing positive & negative integers. We would like to find subarray having maximum sum. We will use
Given an integer array in java. Reverse input array using iterative & recursive algorithm. Example to reverse an integer array
A prime number is a natural number greater than 1 that has no positive divisors other than 1 & itself. e.g.Number 7
Given two sorted integer arrays containing unique or distinct elements. We would like to find out the union of two
Given two sorted arrays containing distinct elements. We would like to find out the intersection of two sorted arrays. Intersection
Given an array of integers in java. Replace every element of array with greatest number on its right. The right
Given an integer array in java, find out the leader elements in an array. What is leader element in an
Given an integer array in java, find the majority (element exist more than half element) element in an array using Boyer Moore’s voting algorithm.
Given a decimal number (base 10), convert decimal integer to binary number (base 2) using java. We will discuss various
Given a hexadecimal number, convert hexadecimal number to decimal number using java. We will discuss various methods to convert hexadecimal
Given a decimal number (base 10), convert decimal to hexadecimal number (base 16) using java. We will discuss various methods to