Java Programming Code Examples
Java > Learning Code Examples
Using Primitive Arrays
C++ Sample Calculate Power of a Number -
Program takes two numbers (a 'base number' and an 'exponent') and Calculates the Power. The technique works only if the exponent is a positive integer. If you need to find the power
C Displays the attributes of a Selected File -
Check a files attributes. Check if the file can be written to. File cannot be written. File can be written to. Check if file can be read. File cannot be read. File can be read. Check if...
Implement Hash Tables Quadratic Probing -
Returns whether n is "prime" or not. Find next prime size of the table. Function To Generate Hash. Function to Initialize Table. Function to "Find Element" at a key. Insert Element into a
Implementation TopDown Red Black Tree -
Test if the tree is logically empty. Return true if empty, false otherwise. Then print the tree contents in 'sorted order'. Internal method to print a subtree t in sorted order. And Internal
Simple Calculator using Switch Statement -
This C Program takes an arithmetic operator +, -, *, / and two operands from the user and Performs the Calculation on the 2 operands depending upon the operator entered by the
Bricks Game program coding example in C -
Create opening screen and accept the level of the player's. Assign the speed to ball as per the level chosen. Draw four layer of bricks, the paddle and the ball. Memory allocation
Displays Nodes of a Linked List in Reverse -
C Program uses recursive function & reverses the nodes in a linked list and displays the list. Linked list is an ordered set of data elements, each containing a link to its successor. Code
Sort Rows of the Matrix Ascending Order -
Program code sorts the rows of the matrix in ascending & columns in descending order. This program accepts matrix. Then sorts the row in an ascending order & the columns in