1. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
class A1
{
class B
{
}
class C
{
}
}
2. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
class B
{
class C
{
}
static class D
{
}
void test1()
{
C c1 = new C();
D d1 = new D();
test2();
}
static void test2()
{
// C c1 = new C();
D d1 = new D();
// test1();
}
}
3. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
class C
{
int i ;
static int j;
class D
{
}
static class E
{
}
void test1()
{
i = 10;
j = 20;
D d1 = new D();
E e1 = new E();
test1();
test2();
}
static void test2()
{
// i = 10;
j = 20;
// D d1 = new D();
E e1 = new E();
// test1();
test2();
}
}
4. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
class D
{
class E
{
int i ;
void test()
{
}
static int j ;
static void test1()
{
}
}
}