Rakesh Sharma

Ranch Hand
+ Follow
since Dec 29, 2000
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 Rakesh Sharma

Hi
Can someone please tell me what server can I choose for using servlets and how to configure the server.
Thanks
20 years ago
I have made a class and a method to fetch the data from Excel thru JDBC:ODBC and it is working fine. When I want to get data from another class I am getting an Exception like
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
Please tell me how to grant the runtime permission in the programme.
Thanks
Please tell me how to use jadc with MS-excel worksheet. Say I have a file "Emp" in excel and I want to retrieve the data from it. How to do it. It will be of great help if steps and code are given.
Thanks
Applets are in the exam syllabus but swing is not.
Hi Ajith
As suggested by you , I looked the API for the same but couln't get what I want. I will be thankful to you if you can give me specific site address where i can look for it.
Thanks
Rakesh Sharma
Please tell me how to set precesion of a number(double). Say I have a number 9.123456 and I want to set it to 9.12. Is there any readymade method available or I have to write a new method for that.
Thanks.
Sure. I rerfered only 2 books. First book was "Java 2 The complete reference" by Naughton & Schildt and Another was "Programmer's guide for Java Certification" by Khalid Mughal. Read the Khalid Mughal book atleast 3 times. Its a really good book for exam purpose. After that take as many mock exams as you can. These exams really help you develope the concepts. I took more than 2000 Que from mock exams. Particularly JQ+ exam is really good.
Don't forget to visit the Javaranch discussion forum daily. it will help a lot.
Rakesh
21 years ago
Hi Dilshad
The answer to your question is "GridbagLayout"
The reason being - Assuming you are adding the text area at the top of the layout. So only Gridbag layout gives you the flexibility to adjust the vertical as well as horizontal space by its "weightx" and "weighty" constraints.
So the answer is definitely "GridbagLayout".
Rakesh
I thanks all the friends for helping me to pass the exam with 93% marks. My special thanks to Javaranchers, Khalid Mughal and JQ+ team.
Rakesh Sharma
21 years ago
I think Static variables are not serialised. Actually serialisation is done on the objects and static variable does't belong to Object, they belong to the class. So they are not serialised. Khalid Mughal book also says so( see page 588).
Rakesh Sharma
Hi Luk
By the "toString" method, two objects are created which are different , so the answer is FALSE.
If you replace '==' by 'equals' then answer is true, because String class overrides the equals methods and compare the contents of String objects.
Hope this clarifies.
Dear Suneel
Can you tell me why infinite loop is formed. I think ans should be 42. We are passing x = 4 in the method.
Hi friends
Is it correct that String objects created by using the string literals ( as shown below ) are not garbage collected.
String s = "XYZ";
Sahshank ir right. The output is "truenull".
As far as I know - true, false and null are not keywords, they are reserved words. For all practical purposes they are treated as keywords but actually they are reserved words.
Now the question comes - what is the difference?
Well can some one answer that.