Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes


       

Java Programming Code Examples

Java > Core Java Code Examples


Page 1 Page 2



C++ Direct Recursion vs Indirect recursion
Direct Recursion: When function calls itself, it is called "Direct recursion". Indirect recursion: When function calls "another function" & that function calls the calling function, then this is

Print only Odd Numbered Levels of a Tree
Two functions in this method. One is to print all nodes at a given level ("printGivenLevel"), and other is to "print level order traversal" of the tree ("printLevelorder"). printLevelorder

C Programming Code N-Queen's Problem
Enter the number of queens(say n) and watch how computer places them in (n x n) matrix such that none can meet another moving along horizontally, vertically or digonally.

Input Password & Validation of Username
Code accept character without echo (without displaying on Screen) getch will accept character and store it in "ch". ASCII value of "Enter Key" is 13. Stop accepting password

C++ Implements Queue using Linked List
C++ program, "using iteration", implements the list of elements removed from the queue in first in first out mode using a Linked list. A linked list is an ordered set of data elements,

Get Sum of Even Odd Numbers in a Range
C Code declare recursive function to find sum of even number. Lets give a meaningful name to our function, say "sumOfEvenOdd()". Next the function accepts two integer values from

Read an Array and Search for an Element
C code accept an array of N elements and a key to search. If the search is successful, it displays "Successful Search". Otherwise, a message "UNSUCCESSFUL SEARCH" is...

Read a String & Find The Sum of All Digits
Program takes a String containing both digits and alphabet as input and finds the sum of all digits in the string. Take the string containing both 'digits and alphabet' as input and store it