Skip to content

Category Archives: Java Programs

The getFreeSpace() function is a part of File class in Java. This function returns the unallocated size of the partition denoted by the abstract pathname,… Read More
The createNewFile() function is a part of File class in Java . This function creates new empty file. The function returns true if the abstract… Read More
Given two integers N and P where P is the product of N unknown integers, the task is to find the GCD of those integers.… Read More
Given an undirected graph with multiple connected components, the task is to clone the graph. Cloning a graph with a single connected component can be… Read More
This article shows how to create an android application to move from one activity to another. Below are the steps for Creating a Simple Android… Read More
Given string str consisting of only the characters ‘a’ and ‘b’, the task is to check whether the string is valid or not. In a… Read More
This article shall be explaining the code to draw a line using paint in Java. This uses drawLine() method. Syntax: drawLine(int x1, int y1, int… Read More
Applied through employee referral Round 1: I was sent a link 40 multiple choice questions were there 20 aptitude questions and rest 20 questions from java fundamentals,… Read More
Given string str of lowercase alphabets, the task is to find the length of the longest substring of characters in alphabetical order i.e. string “dfabck”… Read More
Given an adjacency list representation of a directed graph, the task is to find the path from source to every other node in the graph… Read More
Below are the steps for Creating a Simple Android Application to Add Two Numbers STEP-1: First of all go to the xml file STEP-2: Now… Read More
Given a string str, the task is to print all the permutations of str. A permutation is an arrangement of all or part of a set… Read More
Depth First Search (DFS) marks all the vertices of a graph as visited. So for making DFS useful, some additional information can also be stored.… Read More
Given a string str consisting of lowercase English alphabets, the task is to convert the string so that it holds only distinct characters. Any character… Read More
Given a string and a substring, the task is to replace all occurrences of the substring with space. We also need to remove trailing and… Read More

Start Your Coding Journey Now!