Kishore Kumar

Ranch Hand
+ Follow
since Oct 15, 2007
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 Kishore Kumar

Hi

Can any one please let me know any link/book to learn Oracle Toplink tutorial.
I am using WAS 6 with db2.

I've used currentSchema i.e deafault schema property in Datasource for JDBC connectiion pooling. Is there any way to fetch this value from java. I need to send this value to VB from java.
I still had a bit of confusion here.



Here Ronlad said true && false is never worked. But && is having higher precedence than ||. So it should be evaluated first. and then || should be evaluated.

Now consider this example:

int x = 4 + 2 - 8 / 2
Here first operator / is having higher precedence than + or -. So first expression becomes
x = 4 + 2 - 4
Now x = 2.

So in the same way, since && is haing higher precendence than ||, it should be evaluated. Some body please correct me if i am wrong.
I am also getting the warning message during compiling and the output is also 12.
I am using java 1.5 version.

Main.java:7: warning: go(int[]) in
method is missing '...'
public int go(int [] d){
^
1 warning


Can any one tell me why i am getting this warning message.
Hi,
Actually C1 object is eligible for Garbage Collection. But, C3 gets assigned null, and also C3 is not referring to any object. So there is no object ,eans, no garbage collection for C3.
Coming to second object which is eligible for garbage collection is the wrapper class object Short which is a member variable is eligible for GC.

I hope i explained clearly.
I read like this about finalize method:

finalize is called only once for an object before it is garbage collected. If any exception is thrown in finalize, the object is still eligible for garbage collection (at the discretion of gc). The garbage collector thread runs independent of any application. So it simply ignores the exception and collects the objects if possible.

I am not sure about it.
abstract class can have a private constructor. But that class cannot be extended by another class. Instead add a static inner class inside the abstact class and extend that abstract class.



This is a small sample code.
Hi,



Then i tried with this example. If i remove comment line#1. Program is executed completely. but if i comment line #1, program waits for the thread's notification. Can you explain why this is so here.

Hi,
This code is from the K&B,





OUTPUT:
Waiting for calculation...
Waiting for calculation...
Waiting for calculation...
Total is: 4950
Total is: 4950
Total is: 4950

Well, this is OK... But even when I comment the notifyAll() method call,
I get the same output.. Actually i expected the output to be
OUTPUT:
Waiting for calculation...
Waiting for calculation...
Waiting for calculation...

and the program never stops since there is no notify/notifyAll method called. Instead i get t he same out put. Can any one please tell me why it is so?
Hi,
boolean b = false;
String s = (b=!b)?(b=!b)?"Hello":"hello" b=!b)?"world":"World";

Terinary operators have assositivity from Right to left.
So, the above expression becomes

String s = (b=!b)?((b=!b)?"Hello":"hello") (b=!b)?"world":"World");
So first, this executes:-((b=!b)?"world":"World")
Result is: world and boolean b = true.
Expression becomes:
String s = (b=!b)?((b=!b)?"Hello":"hello"): world
Now, (b=!b)?"Hello":"hello" executes:
Result is: hello and boolean b = false.
So expression becomes: String s = (b=!b)? "hello":"world"
Finally out put is: hello.

I hope i explained clearly.
Two reference variable pointing to the same Short object.
c1.short and c2.short are pointing to same object.
If one is assigned to null, othere will be still pointing to same object.I guess there is only one Short object created. So only 1 object is garbage collected. Any one can correct me if i am wrong.
Hi every one,
I want to throw some points on this. First of all object pointed by c2 reference is not eligible for GC. I think only one object is eligible for GC. Instance variable stroy is not eligible for GC. See the out put of the below code.


Value printed at line 1 is true. that means only one Short object is created. So, since c2 object is still not Garbage collected, we can refer to that Short stroy object using c2 reference. Finally, i conclude only one object is eligible for GC.

Now consider the output of this program:


Now Value printed at line 1 is false. So there are 2 Short story object created one for c1 and other for c2. As c1 is eligible for GC 1 short story object is also eligible for GC. So, a total of 2 objects are eligible for GC.

I can't figure out why if the value of short is >= 128, 2 objects are created. Can any one tell what is happening with Short variable and it's value.
Hi,
I am a new to jsf. I know struts framewor. Now i want to learn jsf. I want some good tutorial on jsf. Can any one send me some good links to jsf tutorials.
12 years ago
JSF
Hi,
I have 2 year experience in JAVA/J2EE. I also secured 91% in scjp1.4. Looking forward for change in job in Hyderabad/Bangalore. Can anyone let me know about good job oppurtunities in Hyderabad/Bangalore for JAVA/J2EE.
12 years ago
Hi every one, I cleared scjp1.4 with 91%. Now i want to go for scwcd. Can any one tell me where can i find the good material for scwcd. I am familiar with servlets and jsp. But i want some materials and some mock exams as well.