Basic input using Scanner class in Java

Write a java program to perform basic input using Scanner class. In this article I will explain how to input all basic data types using Scanner class in Java. We will learn how to use java.util.Scanner class to input data from user.

Example
Input

Enter charater value: c
Enter integer value: 10

Output

You entered charater : c
You entered integer: 10

Read more

10 cool bitwise operator hacks and tricks every programmer must know

Bitwise operators are used to manipulate data at its lowest level (bit level). Data in memory (RAM) is organized as a sequence of bytes. Each byte is a group of eight consecutive bits. We use bitwise operators whenever we need to manipulate bits directly. In this post I will show you some cool bitwise operator hacks and tricks. These hacks will boost your programming skill.

Read more

C program to list all files in a directory recursively

Write a C program to list all files in a directory. How to list all files in a directory recursively. How to use readdir() function to list all files in a directory recursively. Logic to list all files and sub-directories of a directory in C programming. How to use opendir(), readdir() and closedir() library functions.

Read more