Examples

Examples

Reverse a Number

Find Largest Element of an Array

Print an Integer (Entered by the User)

Check Whether a Number is Even or Odd [if-else & ternary]

Convert Binary Number to Octal and vice-versa

Count the Number of Vowels and Consonants in a Sentence

Display Fibonacci Series

Swap Two Numbers

Check Whether a Number is Positive or Negative

Find LCM of two Numbers

Check Whether an Alphabet is Vowel or Consonant [if-else & switch-case]

Compute Quotient and Remainder

Find ASCII Value of a character

Convert Binary Number to Decimal and vice-versa

Multiply two Floating Point Numbers

Calculate Standard Deviation

Calculate Average Using Arrays

Check Whether a Number can be Expressed as Sum of Two Prime Numbers

Compare strings

Convert inputstream to string

Find the largest among three numbers [if-else & nested if-else]

Create random strings

Convert int type variables to string

Convert int type variables to char

Capitalize the first character of each word in a string

Iterate over an arraylist

Clear the stringbuffer

Add two dates

Convert a list to array and vice versa

Get current working directory

Create string from contents of a file

Display alphabets (a to z) using loop

Convert int type variables to long

Print an array

Convert character to string and vice-versa

Calculate difference between two time periods

Iterate over a hashmap

Check if a set is the subset of another set

Print object of a class

Add two complex numbers by passing class to a function

Generate multiplication table

Count number of digits in an integer

Find gcd of two numbers

Display factors of a number

Display armstrong numbers between intervals using function

Add two matrix using multi-dimensional arrays

Check if a string/number is palindrome

Display prime numbers between two intervals

Convert octal number to decimal and vice-versa

Display prime numbers between intervals using function

Reverse a sentence using recursion

Check armstrong number

Find the frequency of character in a string

Multiply two matrices by passing matrix to a function

Multiply two matrix using multi-dimensional arrays

Display armstrong number between two intervals

Calculate the power using recursion

Find factorial of a number

Check leap year

Check whether a character is alphabet or not

Calculate the sum of natural numbers

Calculate the power of a number

Check whether a number is prime or not

Find all roots of a quadratic equation

Make a simple calculator using switch...case

Find factorial of a number using recursion

Find g.c.d using recursion

Add two integers

Find transpose of a matrix

Find the sum of natural numbers using recursion

Calculate the execution time of methods

Implement binary tree data structure

Convert file to byte array and vice-versa

Compute all the permutations of the string

Delete file

Iterate over a set

Check if a string is numeric

Remove duplicate elements from arraylist

Convert string to date

Convert string type variables into boolean

Append text to an existing file

Sort map by keys

Call one constructor from another

Convert double type variables to int

Get the middle element of linkedlist in a single iteration

Check if a string is a valid shuffle of two distinct strings

Convert double type variables to string

Implement linkedlist

Access private members of a class

Convert primitive types to objects and vice versa

Get the file extension

Implement quick sort algorithm

Differentiate string == operator and equals() method