package com.test.Java;
public class A
{
public static void main(String[] args)
{
A a = new A();
A.B b = a.new B();
b.killkarthik();
}
class B
{
private void killkarthik()
{
System.out.println("karthik killed");
}
}
}
http://docs.oracle.com/javase/tutorial/java/javaOO/nested.html