Thursday, May 27, 2010

One of the resource for investing-Bonds

A company needs funds to expand into new markets while governments need money for everything
from infrastructure to social programs. The problem large organizations run into is that they typically need far more money than the average bank can provide. The solution is to raise money by issuing bonds (or other debt instruments) to a public market.

Really, a bond is nothing more than a loan of which you are the lender. The organization that sells a bond is known as the issuer. You can think of it as an IOU given by a borrower (the issuer) to a lender (the investor).

The interest rate is often referred to as the coupon. The date on which the issuer has to repay the amount borrowed, known as face value (also known as the par value or principal), is called the maturity date. Bonds are known as fixed-income.

When a bond's price trades above the face value it is said to be selling at a premium. When a bond sells below face value, it is said to be selling at a discount

When bond investors refer to yield, they are usually referring to yield to maturity.

Types of Bonds
  • Government Bonds
  • Municipal Bonds
  • Corporate Bonds
  • Zero Coupon Bonds
Some of the important points regarding the Bonds
  • Bonds are just like IOUs. Buying a bond means you are lending out your  money.
  • Stocks are equity; bonds are debt.
  • Issuers of bonds are governments and corporations.
  • A bond is characterized by its face value, coupon rate, maturity, and issuer.
  • Yield is the rate of return you get on a bond.
  •  When price goes up, yield goes down and vice versa.
Some of the usefull links
  • InvestingInBonds.com
  • http://www.investopedia.com/university/bonds/

Thursday, May 20, 2010

Different types of Inner Classes

In java we have a option to write a class in another class.Such a class is called the Inner class.
check the following diagram ,it will explain the how the class architecture in the Java

These are categorised into Static and non-static inner classes.Under non-static inner classes we have inner classes ,Local inner classes and Anonymous Classes .Objects that are instances of an inner class exist within an instance of the outer class
and has direct access to the methods and fields of its enclosing instance
Local inner class
we can declare a inner class with in a body of a method
Syntax of creating an object for  inner class
OuterClass.InnerClass innerObject = outerObject.new InnerClass();
Anonymous inner class
we can also declare a inner class with out a name with in the body of a method.
ex:DriverManager.getConnection() method is using this concept only.
Static inner classes
As with class methods and variables, a static nested class is associated with its outer class.
Syntax of creating an object for Static inner class
OuterClass.InnerClass innerObject = new OuterClass.new InnerClass();

Ex
class OuterClass
{
   ------
   -------
       class InnerClass
          {
             -------
             -------
          }
}