Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!

hema gopalakrishnan

Greenhorn
+ Follow
since Sep 01, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by hema gopalakrishnan

HI,

Can any one tell the difference between static and final (AND) static final and fial static.
Hi,

Can any one explain about access modifiers-how to use? where to use? what to use?(Valid and Invalid use of access modifiers for exam point of view)
HI Vidyasagar

can you explain some little about isinstance()
Hi All,

can any one explain me....



class A
{
private static int counter;
public static int getCounter()
{
return counter++;

}
private static int innerCounter;
public static int getInnerCounter()
{
return innerCounter++;
}
private String name;
A()
{
name = "A" + getCounter();
System.out.println(name);
}
class B
{
private String name;
B()
{
name = "B" + getInnerCounter();
System.out.print(A.this.name + name);
}
}
void m1()
{
new A().new B();
}
void m2()
{
this.new B();
}
void m3()
{
new B();
}
public static void main(String[] args)
{
A a = new A();

a.m1();
a.m2();
a.m3();
}

}


Output is :-

A0
A1
A1B0A0B1A0B2
Hi


ok, we have two references but how many objects are created in the
"String Constant Pool" and how many on the "Heap"?



String Constant Pool : 1
Heap : 1
Hi Karthik,
SCJP by Kathy Sierra and Bert Bates is the best book to prepare for SCJP. Khalid and Brates is also good.

for mock exams gothrough the following websites
1.www.jchq.net
2.www.javaprepare.com
3.www.gayanb.com(you will find around 70 mock exams in this)

Regards,
Hema Latha
17 years ago