Java Programming Code Examples
Java > Learning Code Examples
Catching an exception
C++ Programming Opens Reads Text Files -
This function reads n lines from a file. Returns the amount of bytes read. Try to open txt file. Try to locate the starting line. Set the starting position. Read the lines. Close the file. Return
Finds Nodes Which are at Max Distance in -
Find nodes which are at maximum distance in binary tree. Create a new node with the data from the user. Check for root node and then create it. Search for the appropriate position
C Code Check Palindrome Using Recursion -
In this article we have shared two C programs to check if the input number is palindrome or not. 1) using while loop 2) using recursion. If a number 'remains same', even if we reverse its
C Programming Codes Creating a PHP File -
Please enter the name of the file you wish to create. in the format myfile.php. Now enter a name for the counter file. Please enter the starting count. Create counterfile with the...
C check uppercase or lowercase characters -
Code Step by Step descriptive logic to check Uppercase and Lowercase alphabets. Input a character from user. Store it in some variable say ch. Character is uppercase alphabet if(ch
Program code to Find the Size of a Union -
C Define the union named sample. Declare three variables m, n and ch of different data types. Use the keyword sizeof() to find the size of a union and print the same. Initialize
C++ Language Counts Words in Sentence -
To "count total number" of words used in any sentence in C++, you have to ask to enter the sentence. And then, to count total number of words present in the string, search for spaces
Demonstrates Printf Inside Another Printf -
Firstly Inner printf is executed which results in printing 1324. Printf returns 'Total Number' of Digits:4 & second inner printf will looks like. It prints 4 & Returns the Total Number of digits