This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!

Prasanna l reddy

Greenhorn
+ Follow
since Mar 14, 2011
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 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/logon.do ( note: port number may be different depends on your configuration)

Thanks.
6 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..

Thanks
hello,

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() {
try{

}catch(IOException e){

}
}

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

void m1() {
try{

}catch(ClassCastException e){

}
Congratulation!!! wahh you passed with 95 % thats amazing..
8 years ago
hi,

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 gab2...so I think non eof them are eligible for GC...

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

Thanks,
Lakhmi
hi,
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...
hi,
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 ..it compiles with java 6 ......one 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.. ..is 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 ..is 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 diagram..how 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
System.gc();
}
}


Thanks,
Lakshmi
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.