sreedhar lak

Ranch Hand
+ Follow
since Feb 26, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by sreedhar lak

Hi All,
I am facing one problem in my application only some times.
The problem description shows it is regarding cursors opened (ORA-01000).
Please see the code below...
closeDBStuff(Connection con, Statement pStmt, ResultSet rs){

if (rs != null)
rs.close();
if (pStmt != null)
pStmt.close();
if (con != null)
con.close();
con=null;
rs=null;
pStmt=null;
}
I am calling this method from all my methods from a finally{} only.
My doubt is: Suppose if i created an object/ref to PreparedStatement in one method and in that finally i am calling closeDBStuff() method by passing this PS ,it is not giving any error even this closeDBStuff() is expecting Statement obj.but my doubt is whether it is really closing that obj.
Please help me in this regard...
Hello All,
How can we make a site as https i.e., secured one.
I know using SSL we can do but not that much.
Please give me some example code....
thanks a lot
Hi All,
I am beginner to LDAP.
Can any one tell me how to create a user,actually i have a form when i click save it should insert the user data in the oracle database and LDAP database,i know how to insert into oracle database,and using JAVA it should work.
Thanks a lot
Hi All

I have an HTML page that has different sections on web page. When we click the link to print a hard copy of the page.

I want to take user choice like which section you want.
Please tell me how to give print option only for selected area/sub window.

Thanks a lot
Hi,
Can any one tell me what is the difference between object and instance.
I know,Instance of a class is called object.,then what is instance.
Please i have confusion with these two
Hi,

"Stack memory is the program's memory, and heap memory resides outside of the program"
What it means actually,please
Thanks a lot
Hi,
I have a doubt in the answer for the below.I read this question from one mock exam.
Which of the following statements about interfaces is correct?


A Due to Java's principle of single inheritance, a class declaration can only name one interface.

B All methods in an interface have default accessibility unless declared otherwise.

C All methods in an interface have public accessibility.

D An interface may not contain any variables.



Correct option "C"
A - No, a class declaration may include multiple interfaces.

B - No, all methods in an interface are implicitly public.

C * Yes, all methods in an interface are implicitly public, no matter how the interface itself is declared.

D - No, interfaces may define static final variables

They provided check box ,to select multiple.
My options are C,D
Please tell me Wht is my mistake
Thanks a lot
Sorry,I am getting compile time error

---------- compile ----------
Sample.java:4: ';' expected
for(int i : nums)
^
Sample.java:7: illegal start of expression
}
^
2 errors

My Jdk version is :"j2sdk1.4.2_08"
please,tell me what is enhanced for loop
Thanks a lot.
Hi Swarupa,
Are U sure ?I think it will creates only one class i.e Test.class.
Thanks a lot
Hi Swarupa,

"You are compiling file Name.java and java compiler gerates the Test.class and Name.class files so when u run the java program using Name class it shows NosuchMethodError because it doesnot have main method and u r trying on Name class ,Try to run program using java Test"

Are you sure? If we compile file Name.java and java compiler generates the
"Test.class and Name.class" for the above code.
According to me it generates only one class file with name Test.class.

Correct me if i am wrong

Thanks a lot
Thank you.
But you explained only what i know.
How to call the constructors explicitly,here we will use this...am i correct,but how.
wht is current object...

Thanks a lot
Hi Anuradha,
Thank you very much ,it is working fine now.
But,can you tell me some thing about assertion i read in books but i didnt get clear idea about that.
Please ,give me some explanation with uses,if possible by example.

Thanks a lot
Hi shibaram,
I am also staying in pune,and planning to write scjp.
Let me know once you purchased the book.
sanjay and shibaram where you purchased the voucher and what about the test center.

Please tell me
Thanks a lot
Hi,
I just copy and pasted above code to test.But even it is not compiling.

it is giving following warnings and errors,i can ommit warnings but what about errors because of these two errors it is not generating class file.
I dont know the concept of assertions ,can any one help me to find clear idea about this.Like uses.

---------- compile ----------
TestAssert.java:16: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
assert t<4:bar(7);
^
TestAssert.java:16: ';' expected
assert t<4:bar(7);
^
TestAssert.java:17: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
assert t>1:foo(8);
^
TestAssert.java:17: ';' expected
assert t>1:foo(8);
^
2 errors
2 warnings
Hi All,
Actually what are the main advantages and disadvantages of "this"?
I know few,
to remove name abiguity for compiler,means this.name=name situation,and calling a constructor but dont know how.
Please tell me,actually what will happen internally when we use "this".
And correct me if i am wrong,"this" means currently invoking object.
what does it means?

thanks a lot