Author Archive


Java Decimal to Hexadecimal Conversion

In Mathematics, we use various positional numbering schemes for representing numbers. We are familiar with decimal numbering system which uses a base of 10. Two other commonly used numbering systems in computing are hexadecimal (base 16) and binary (base 2). Conversion of decimal value to hex string requires the following steps, Find the reminder of […]

Java Hexadecimal to Decimal Conversion

In Mathematics, we use various positional numbering schemes for representing numbers. We are familiar with decimal numbering system which uses a base of 10. Two other commonly used numbering systems in computing are hexadecimal (base 16) and binary (base 2). When we represent a number in hexadecimal system, we use the symbols 0 to 9 […]

Creating Static ListView in Android

Listviews in Android is a very versatile UI component for handling display of a list of items. One common use case is to create a simple fixed menu of items from which user can select an option. This tutorial explains the step by step procedure for creating a list view with static items. In our […]

Difference between HttpSessionAttributeListener and HttpSessionBindingListener

Servlet API in Java EE defines different types of event listener interfaces for watching changes in HttpSession. Two of these interfaces namely HttpSessionAttributeListener and HttpSessionBindingListener cause confusion among programmers. These interfaces enable 2 different ways of handling session changes. This article explains each listener with an example. HttpSessionAttributeListener Interface A class can implement HttpSessionAttributeListener interface […]

Sum of Digits of a Number in Objective-C

The following Objective-C program prints sum of digits of a number entered by user. This program will only compile in latest compilers as it uses ARC paradigm. The program uses scanf c function to read user input. // Print sum of digits of a user entered number #import <foundation foundation.h> int main(int argc, const char […]