Java Programming Code Examples
Java > Learning Code Examples
Java Doc Comments
Program Sample Displays Prime Numbers -
If a number passed to checkPrimeNumber() is a Prime Number, this function returns true, if not the Function returns false. If enters larger number first, 'code' will not work as intended.
C++ Finds Maximum Element in an Arrays -
Construct "Binary Search" tree for "unsorted" data array. For the 'Maximum element' move the pointer to the rightmost child node. This value will be the minimum value among data.
The Mind Reader game C Coding example -
Choose a two digit number and add digits. Subtract the sum from original number. See the symbol opposit to the number you got. Press any key The MIND READER will display
C Program to Illustrate Pass by Reference -
C code to illustrate pass by reference. Pass the addresses of the variables as parameters to the function. In function definition receive the parameters through pointers. Print the...
Pointer Simple Program Pass by Reference -
C++ Language program sample which passes a "Reference" to a Function and Function has a 'pointer' as argument. Keep the return type void & display result in main body. Apply any
Implements Max-Flow Min-Cut Theorem -
Program demonstrates implementation of max-flow_min-cut_theorem. So returns true if there is a 'path from source' 's' to sink 't' in residual graph. Also fills parent[] to store the
Binary Search Tree Code in C++ Language -
Smaller elements go left. Larger elements go right. All insertions are as leaf nodes. Remove a leaf node and remove a node with a single child. Remove a node with 2 children, replace
C++ An Object can be Passed to Functions -
An object can be passed to a function just like we pass structure to a function. Here in class A we have a "function disp()" in which we are passing the object of class A. Similarly we can