Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

Prasanna l reddy

+ Follow
since Mar 14, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prasanna l reddy

Hi, I got exactly same issue when I run the application in debug mode.

Solution :

In WAS admin console >servers >application server. Then click on Server1 > Process Defintition>Java Virtual Machine. Here you see all general properties and increase Initial Heap Size =256 and Maximum Heap Size = 512. THis fix the above problem.

Url for local host: http://localhost:7090/admin/secure/ ( note: port number may be different depends on your configuration)

8 years ago
Hi All,

I am back to Java Ranch and completed SCJP 6 certification. Now I would like to get SCWCD certification in coming months. I already compelted reading 5 chapter from Head first servlets and JSp book. Does any one interest to join study group to meet once in couple of days to discuss the topics. Please let me know..


Any checked exceptions that are catched in a catch block must thorw in the try block. Otherwise you will get a compiler error. On the other hand you can catch unchecked exception even though you are not throwing in try block. The compiler won't complian.
Compiler error: in order to use chekced exception in catch block that should throw in try block .
void m1() {

}catch(IOException e){


No compiler error: because it is unchecked exception you are catching:

void m1() {

}catch(ClassCastException e){

Congratulation!!! wahh you passed with 95 % thats amazing..
10 years ago

As I see there are no objects aligible for GC eventhough gab1 and gab3 are null. These two(gab1 and gab3) are still refer to I think non eof them are eligible for GC...

Can anyone tell how 2 objects are eligible for GC??? Thanks in advance.

I understand how c is eligible for gor GC, but not clear how d is eligible for GC... d is first assinged to one object and that object is assigned to new a()..then how d is eligible for GC???.....thanks in advance for all your explanation on this so for...
I understand how c i seligible for gor GC, but not clear hoe d is eligible for GC... d is first assinged to one object and that object is assigned to new a()..then how d is eligible for GC???.....thanks in advance for all your explanation on this so for...
ok got you compiles with java 6 object created for Integer A[] = {1,2,3,,4,5}; because intialization happens.......if its just Integer a[] then no object is created on teh heap.. that correct?
my understanding is you can't create Integer A[] = {1,2,3,,4,5}; its a type mismatch can't convert from int to Integer...
objects are created if you use either "new" or instantiate teh array (if it is an array)

So my answer would be there are no objects created for Integer A[] = {1,2,3,,4,5};
also on the first quesion instead of int [] array (int[] dz = {1,2,3,4,5,6,7,8,9,10,11,12};} ) if it has some other primitive variable (like just int or float..) then there could be 3 object created and one is eligible for garbage colleciton that correct??

I assume just int i = 5; doens't create the object on teh heap??? any suggestions??
hi Jackzia,

creating our own diagram for this GC helps a lot...your way of picturization helps a lot and gave better understanding on the creation of object and when its availbale for GC.

here is one more question related to GC....can you explain with the many objects are created and how many objects are eligible for GC at this comment //line 1
I drew a picture of this with 3 objects on the heap....but couldn't get how I can connect A aob reference variable to link other objects(A a = new A(); A b = new A(); A c = new A();)

class A {
A aob;

public static void main(String args[]) {
A a = new A();
A b = new A();
A c = new A();
a.aob = b;
b.aob = a;
c.aob = a.aob;
A d = new A().aob = new A();
c = b;
c.aob = null;// line1

Hi Amir,

This is my first post on java forums as I am preparing for SCJP certification. I have a question on your expalnation for the follwoing lines...

line 06: da[0] = new Dozens();
line :07 Dozens d = new Dozens();

You said
line 06: Two Objects are created.. ONE: of type Dozen .. TWO: array type referenced by"dz".
line 07: Same 2 Objects (Dozen , Array ) .

On line 6 how its going to create two objects? There is only one "new" which means only one obect is created...same thing on the next line. Appreciate your help on this.