shahid iqbal

Greenhorn
+ Follow
since Mar 04, 2007
Merit badge: grant badges
For More
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 shahid iqbal

Originally posted by Louis Moloney:
At compile time the compiler converts your code into bytecode that is it.

At runtime is when the string constant pool will be looked at by the jvm to see whether the string exists already or not.



i know it bt how is it possible at compile time the compiler looks to pool.please explain briefly.it makes little bit upset.
Wasimullaha
an abstract class may or may not have abstract method.but it is not a good programming practice.if you put abstract key word at the class header then your class is taken as abstract.you can't call its constructor.because abstract class means incomplete class.but an abstract class have constrouctor.but you can't call it. its sole purpose & mission is to be extended.so you can't put private access specifier in the abstract method if any.better you go and try it on your machine.

shahid
Rancher
i have doubt on String
Its mentioned in the book that (To make Java more memory efficient, the JVM sets aside a special area of memory called the "String constant pool." When the compiler encounters a String literal, it checks the pool to see if an identical String already exists. If a match is found, the rerence to the new literal is directed to the existing String, and no new String literal object is created. (The existing String simply
has an additional reference.)
According to my knowledge the compiler only checks syntax error.At that moment no memory allocate for object.jvm is different thing and compiler is different thing.how can it have any information about object.at compile time.