Java program to add or sum two matrices with example
Given two matrices in Java. Write a program two add matrices. Two matrices can be added only if they have […]
Given two matrices in Java. Write a program two add matrices. Two matrices can be added only if they have […]
Given inputStream in Java Convert InputStream to String using InputStreamReader class in java. Methods of InputStreamReader used for inputStream to
Given an array of strings in java. We would like to sort an array of strings in alphabetical order using
Given String in java. We would like to count number of vowels & consonants In English there are 26 alphabets
Given String in java. We would like to print duplicate or repeated characters in a String. Examples: Duplicate or repeated
Given char value in java. We would like to convert char to string using following methods. toString method of Character
Given String value in java. We would like to convert String to char & char array using following methods. charAt
Given char array in java. We would like to convert char array to string using following methods. Java 8 Stream
Given two binary numbers in java We would like to find out sum of two binary numbers. Examples: add two
Given a integer number, check given number is positive. negative or zero. If the input number is greater than zero
Given a integer number, find out the power of given number. Methods to calculate power of given number. Calculate power
Problem Statement ? Given Principal amount (P). Rate of interest (R). Time Period (T) Find out the simple interest in
Given a decimal number (base 10), convert decimal number to hexadecimal (base 16) using java. We will discuss various methods
Given a decimal number (base 10), convert decimal number to octal (base 8) using java. We will discuss various methods
Problem Statement ? Given a number or integer in java, we would like to calculate the sum of all digits.
Given a decimal number in java (base 10) Find out number of consecutive 1’s in a binary number. 1. Examples
Given a standard error output stream, Write the standard error to a file in java. We will use System.setErr method to redirect std output to a file.
In java application, we write to console output using System.out.print*. We would like to redirect console output to a file.
Given a String in java, we would like to convert the input String to lower case & upper case. String
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
LCM (Least common multiple) of two integers is the least positive integer that is divisible by both a and b. e.g
Given a string in java, reverse each word of string using StringBuilder in java. Let us look into couple of
Given a string in java, reverse the string word by word. Let us look into couple of examples to understand
Given two input numbers, swap numbers using temporary variable. e.g. Given two input numbers x = 10 & y =
Given an integer, check whether input number is prime or not. A prime number is a natural number greater than 1
Given a binary number, convert binary number to decimal number using java. We discuss various methods to convert binary number
The greatest common divisor (GCD) is the largest natural number that divides two numbers without leaving a remainder. e.g gcd ( 10,15) =
What is palindrome ? A palindrome is a word, number, phrase, or other sequence of characters which reads the same from