Rajpal Kandhari

Ranch Hand
+ Follow
since Aug 26, 2000
Merit badge: grant badges
For More
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 Rajpal Kandhari

Hello,
Any one intrested in Java Certification books , (in New Delhi & NCR) (second hand 60% price), contact Rajpal at 5174550 or 9810076853.
Hello Everyone,

Hope you all remember me. At home i was working on Ms-Access and Win OS using JWS. But when it came for real deployment i had to re-write every thing according to Tomcat, mySql and Linux OS.
Well had to do lot of R & D. So here is my code (about 75%) whcih i could write till now. Would request you all to have a look at it.
Note: I keep on updating the code. And adding and deleting files.
I need your reviews and would appriciate if you post them in Delhi-Java forum.

------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------
22 years ago
Hello Everyone,

I would request JavaRanch Sheriff and Bartenders to check new look of www.delhijava.com
I would be waiting for your response and suggestions.
------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------
(Marilyn erased period from URL)
[This message has been edited by Marilyn deQueiroz (edited April 30, 2001).]
22 years ago
Hello Everyone,
My Appologies.
For a better picture please refer to the following links:

http://www.javaranch.com/ubb/Forum3/HTML/000240.html
http://www.javaranch.com/ubb/Forum7/HTML/000759.html
http://www.javaranch.com/ubb/Forum10/HTML/000245.html
I have removed all the pages. Learnt a good leasson. Working on such big thing require support of like minded people and team work. But I was alone. So i had to do this. Could any one of you think of doing all this by yourself.
Sorry again. I don't have right to speak in such tone. You all are experts in your field. I look forward to learn more for you guys and definately improve from my mistakes. After all I am human.


------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------
22 years ago
Hello,
With the intention of bringing peoples, whose all second language is Java , under on roof - we have made Java Discussion Forum.
We are looking for expert people from Delhi who are voluntary willing to work as moderator for this site.
All those who are intrested are required to send your brief resume at delhi_java@yahoo.com.
Regards,
Rajpal
22 years ago
Hello Everyone,
I did prepared myself for giving SCJP2 exam but i got married on 11th Feb. Now after one month i am again comming back in action and will be persuing with my Advance java Studies and will keeptrack of SCJP2 exam study. I did made lots of notes and collected lot of mock exams. I am on verge of ending my Honymoon and will be comming back to Delhi on 5th March. Mean while you all can keep in touch with me through mail and we can share our knowledge together to wards common goal.
I would like to make study group so that we could meet and discuss our doubts. This is just a beggining and i appreciate all suggestions.


------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------
Hello James,
RHE book says on page-9 "The range of a variable of type char is from 0 through 2(power)16-1."
Now which author is correct.
What do experts have to say about this.
------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------
Hello Golu Jain,
Read the question carefully:
Wether the static sleep( ) method of the Thread class ,when called in a synchronized method of any class will make the currently running Thread "loose" the respective object's monitor.?
Options:-(a)True,(b)False.
I think that answer sholud be (a),But the answer is (b)i.e. False.
I think you didn't read the question properly. The answer of the above question is (b)i.e. False.

------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------
Hello Matt,
Q35. Correct ans is A.
Q41 Correct ans is A & C.

------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------
Hello Sunil Kumar,
I purchased JQ+ in last week of December and paid 300/-. I send them DD from State Bank of India. I got the software through mail and it was a jar file. So you need to have JDK installed on your machine, which you must be having.
If you r in/around Delhi then call me at 5713869 for more specific information.
If the site say 450/- then it will be 450/- ($10).May be recently they must have hiked prices.
For ZeeShan:
Here is the direct link to their site: http://enthuware.com/jqplus/

------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------
Hello Bala,
Here is my explanation:
Accoring to the API:
setCharAt
public void setCharAt(int index, char ch)
The character at the specified index of this string buffer is set to ch. The string buffer is altered to represent a new character sequence that is identical to the old character sequence, except that it contains the character ch at position index.
"The offset argument must be greater than or equal to 0, and less than the length of this string buffer."
Parameters:
index - the index of the character to modify.
ch - the new character.
Throws:
IndexOutOfBoundsException - if index is negative or greater than or equal to length().

Keeping in mind above explanation:
The following line
StringBuffer s=new StringBuffer("'\u0061'");
is creating a StringBuffer object whose length is 3.
length() method Returns the length (character count) of this string buffer.
In StringBuffer( also in String) index start from 0. So your following line
s.setCharAt(5,'A');
will work fine from 0 to 2 in place of 5.
you try your code by changing 5 from 0 to 2.


------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------
Hello George,
First make following correction in your code
public class test{
Static string f() // small 's' in Static and capital 'S' in string
{
String s="hello"; //keeping in mind your line commented as 2 & 3 i suppose that this reference variable should be 'a'
String b="bye"; //1
String c=b+"i";
String d=b;
b=a; //2
d=a; //3
return c; //4
}
public static void main(String s[])
{String msg=f();
System.out.println(msg); // 5
}
}

For Latha:
in this line by you
String c=b+"i"; //- c refers to bye + "i"
But actually c refer to new String object which is result of concatenation of b+"i" that is "byei".
So bye will be eligible for garbage collection after line 3 when there are no more reference to object "bye".

------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------
Hello George,
Only 3 is the correct answer.

The automatic garbage collector calls the finalize method in an object which is eligible for garbage collection before actually destroying the object.
------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------
Hello Ajith & Eveyone out here:

If code is like below,
String str="First";
str="Second";
str="Third";
str="Four";
Then after line 4, 3 objects will be eligible for Garbage Collection.
Should we conside this as the bottom line:
"How the string object is created (with new or without new) has no effect on Object eligible for GC."
Pls help us out.


------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------
Hello Ajay,
Son Le , Zheng have given correct explanation. But their was no need to make class B static , as done by Zheng.
Ajay, their were two error on your original code. First, you did not close class A. Second, in class C main() method make following change
A.B bb=aa.new B(); //A.B instead of B
Instead of writting main() method in class C if you had written main in class A then your original line B bb = aa.new B();would have worked. And you could also write as B bb = new A().new B();
Ajay,
as you want to know about application of Inner class:
Here is my explanation: You would want to create a nested class for two main reasons:
1. You might want to make use of the special functionality of class A from from within class B without complicating the inheritance hirerarchy of either class. This is the reason for the use of inner classes to support the Java 1.1 event model.
2. From the point of view of programming philosophy, if class B exists soley to help work with class A, you might as well make class B a member of class A. This help to keep all the code related to class A in a single source code file.
If have any more doubt fell free to ask.

------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------