This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

kundana sharma

+ Follow
since Sep 09, 2012
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 kundana sharma

At line 20 how many objects are available for Garbage collection?
My Ans is 2 objects will be Garbage Collected.But some say it to be 4.
My Solution:
s1--->SO1. At line 13.Lets acronym Sparrow Object as SO;
s2--->SO2. At line 14.
s3--->SO3. At line 15.
After line 16:s1--->SO3 ,s2--->SO2,s3--->SO3.So SO1 available for GC.
After line 17:s1--->SO3 ,s2--->SO3,s3--->SO3.So SO2 available for GC.
After line 18:s1--->SO3 ,s2--->null,s3--->SO3.
After line 19:As both s1 and s3 refer to same object, nothing much wrt GC is going to happen in this line.
Is this correct? some say 4 objects will be Garbage collected.
8 years ago
I am solving this problem:A user inputs a string consisting only alphabets and numbers (qqw123sfw33434).Now my job is to print an alphabet and a number like (q1q2w3s3f3w434) .I am able to extract both the both the Strings and integers into separate arrays.Now I need a logic to print one element of the array followed by another:
My code:

I know I am getting null pointer exception
8 years ago
Thank you .
I understood this after I posted the question.
This question is confusing me a lot.
Can some one clarify this.please explain both the cases:enabling assertions and disabling assertions.

Thanks Martin. e.printStackTrace() helped.I didn't iterate through ResultSet.I fixed it.
Will get back If some problem arises.
There is a table called Student whose structure is like this
ID (PK) (Number) | Name (varchar2) | Class (number) |
I am connecting to a remote Oracle db.\

My Question: an SQL exception when it comes to line no 19.(when I debug the cursor jumps to line no 26 from 19 )I am not able to figure out what is happening.
I know that there is problem with result set,but I am not able to fix it.
thank you in advance.
what does ^ do in java? I know that it is XOR which means it returns true only if both the arguments are true.
but I am not able to understand this.
public int xoring(int x,int y){
return (x^y);
what does this method do?please explain with an example.
The whole code snippet is this:
9 years ago
can you please explain what is happening from declaration of the 2d array through till end.
I am stuck here.

I am not able to make out What result set contains.Is it an array of ints?
please help Dey
My task:I want to calculate interest for an account_no at the end of the month.
Sample database:
Code for calculating interest:

I am not able to make out how to extract timestamp into result set and then use it.
please help.
I have a column name from_date as a timestamp in my Oracle Database.
Sample data:
The Question is How can I extract only the day part from the database using JDBC in java code.I mean I just need the '13' part in 13-Dec-12 7:41:54 PM ,'27' part in 27-Dec-12 7:41:54 PM.
I want the data to be in an array in increasing order.
please help I am not well versed in java.