# Java Programming Code Examples

## Java > Core Java Code Examples

### Computing Fibonacci numbers

Using Binary Search Technique & Displays -
To perform "Binary Search" in 'C++', enter the array size, enter the array elements. Now ask to enter an element that is going to be search to "start searching" that element using binary

C Program code check Armstrong Number -
A number is called as "Armstrong Number" if Sum of Cubes of Digits of Number is equal to the number itself. In C code, we are checking the input number is Armstrong or not. Check

Find the First Occurrence of a Character in -
C program to 'input any string' from user and find the 'first occurrence' of a given character in the string. Input string from user and store it in a variable say "str". Run a loop from start

Check If a Given Number is Prime Number -
Program takes a number and checks whether a given number is Prime or not. Take number as Input & Check if the number is Divisible by any of the natural numbers starting from 2. If

C++ Program to Find LCM of two Integers -
Examples on different ways to calculate LCM ("Lowest Common Multiple") of two integers using loops and decision making statements. "LCM of two integers" a and b is the smallest

Returning a Reference to a Pointer In C++ -
To declare such a function, precede its name with * and &. In the body of the function, you can do whatever is appropriate. An important rule with this type of "function" is that it must

C++ Pointers to Pointer or Double Pointer -
Dereference operator or indirection operator, noted by asterisk, is also a "unary operator" in C++ languages that uses for pointer variables. 'Double Pointer' or Pointer to Pointer need to

C Language Code Convert Binary to Octal -
Program takes a binary number as input and converts to octal. Take a binary number as input. Divide the binary number into groups of 3 bits. For each group of 3 bits, multiply...