java

java

Java program to get inputs from user using Scanner Class

In this example , we will see how to get inputs from a user. We will use the 'Scanner' class to get the inputs. We will scan one String, one int and one float.

Read
java

Write a Java Program to get all the permutation of a string

In this tutorial, we will learn how to print all the permutation of a string . We are going to use recursive approach to print all the permutations

Read
java

Java Program to find the last non repeating character of a string

This program is to find the last non repeating character of a string. To solve this problem , we are going to use extra space, i.e. extra variable to store the count of each characters.

Read
java

Java program to find the kth smallest number in an unsorted array

This tutorial is to find the kth smallest element of an integer array ( unsorted ). To find kth smallest array, we can simply sort the array in increasing order and find out the kth positioned number.

Read
java

Java program to print a square using any character

This tutorial is on how to print a square like below using any character in Java :.

Read
java

Java program to print a rectangle using any special character

In this tutorial, we will learn how to print a rectangle in Java using any special character . For example take the below rectangle :.

Read
java

Java Program to reverse a number

In this tutorial ,we will learn how to reverse a number in Java. First we will take the number as input from the user, then convert it to a string and reverse it . Then again we will convert it back to integer.

Read
java

Java program to find Permutation and Combination ( nPr and nCr )

In this example, we will learn how to find permutation and combination of two numbers. Permutation is denoted as nPr and combination is denoted as nCr.nPr means permutation of 'n' and 'r'. nCr means combination of 'n' and 'r'.nPr means permutation of 'n' and 'r'. nCr means combination of 'n' and 'r'.nPr means permutation of 'n' and 'r'. nCr means combination of 'n' and 'r'.

Read
java

Java Program to Multiply Two Matrices

In this Java example, we will learn how to write a program to multiply two matrices. First we will take inputs of both the matrices from the user. Then we will multiply both matrices and print out the result. For taking inputs from the user , multiply matrices and to print a matrix, we have different methods.

Read
java

Java Linear Search : search one element in an array

In this tutorial, we will learn how to do a linear search on elements of an array . Linear search means we will search for an element one by one. For example for the array [1,2,3,4,5,6,7], if you want to search for any number , we will search one by one element and compare it with the element to be searched i.e. 1,2,3,4....

Read