Sunday, August 28, 2016

About a Stamp 1 - Life of the Prince "Siddhartha"

A plea to the Master to descend from the heaven.

A 12th century painting from Tivamka image house, Polonnaruva.





The gods approached the future Buddha in the heaven of delight (Tusitha) and begged him that the time has come for him to save mankind by descending to earth and attaining Buddhahood, The goods said "O" blessed one, you did not attain the ten perfection from the desire for the glories of Indra or Mara or Brahma or of a mighty emperor, but you fulfilled them for achieving Omniscience o that mankind can be saved.

Thursday, March 10, 2016

How Number Type Conversions works in java?

When an operator combine two or more operands in different number format all the numbers are converted to a common data type before they are combined.



1. If at least one of the operands is type of double others are also converted to double.

2. Else if either of operands is type of float other one is also converted to float.

3. Else if either of operands is type of long other one is also converted to long.

4. Else bothe operands are converted to int.



This is called auto casting.



Eg. When 'A'+2

char values 'A' is converted to the int value 65 and the final result type is int. Result should be 65+2=67.



In java number type conversion is always legal if there is no loss of information.

From byte to short, int, long, float, double.

From short to char, int, long or double.

From int to long or double.



From int to float and From long to float or double conversions are also legal, but they may lose informations.



Double can convert into int or float or byte using casting. But there may be information loss.

Eg. double a=3.7

int b=(int)a



value of b is 3. Whether it is 3.1 ----- 3.9.

Thursday, February 4, 2016

How to create a BIRT report?

Open the Eclipse.
Choose file--new-- Project
Then select Business Intelligence Reporting tools
select report project and click next
Give a name for the report and click finish

Click OK if asked to switch to the report design perspective.

What is String concatenation in java?

You can use + operator to concatenate two Strings.
Eg. String firstName=”Jenny ”;
String lastName= “Peter”;

When we want to get the full name of the person, we can concatenate two Strings firstName and lastName and get the fullName.
fullName=fisrtName+lastName;
or
fullName=”Jenny “+lastName;

When you concatenate a string with another value, that value is converted to String.

Eg. int age=25;
String output =age+” years”;

Now output is “42 years”