Help coderanch get a
new server
by contributing to the fundraiser

Kumar J

Ranch Hand
+ Follow
since Feb 13, 2005
Merit badge: grant badges
For More
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 Kumar J

Can you show the code that you have put where outside also (web.xml) things work fine?
Correct mapping means the xml file is put as per the dtd with all the required and optional falling in place in the right locations.
Please change the function name...Since one is rollit()...give something else for the second rollitagain()...
plz give feedback...
declare a temp var...set it as a attribute preferably...just for your temporary calculations...keep incrementing the var each time the inner loop is executed.

You have definately set a high target that would mean you need to be thorough on your concepts and need to read and observe the questions...
Most of the mistakes happen because we missed reading some part or assumed...
So,if you are really charged up again as you say...identify the areas and find what was the reason for the may be you missed out the signature...or the attribute name re-read the boook you are referring ...this time closely...

Take breaks...Try out something that would be more of fun...May be gardening or a walk with your neighbour's dog or just relax in your tub of cool water...

Adn then after this brief break again jump into not to but to
enjoy preparing to break that barrier

At the end are going to jump and

and We may go for


Hi Barry,
Thanks for bringing to my notice.
I think you have not mentioned in the Naming Policy that we should not use Mr/Dr/Sir.I think it would be nice to put it.Next V is for Varma that we put as initial.Is it essential to put the initial in the beginning ? J meant Java/JCP.Let me know if this is ok.Thank you.
[ May 12, 2005: Message edited by: Kumar J ]
see this from api

public static Boolean valueOf(String s)

Returns a Boolean with a value represented by the specified String. The Boolean returned represents the value true if the string argument is not null and is equal, ignoring case, to the string "true".

Example: Boolean.valueOf("True") returns true.
Example: Boolean.valueOf("yes") returns false.

so the values contained are true and false and false resp.

so u get false,true,false
Got it
refer to page 370...figure is clear map is also expected...I suggest u read that chapter 2-3 times and make your own get clarity...

Originally posted by Timmy Marks:
Thread is part of java.lang

the run method is defined in the Runnable interface; also part of java.lang

Hi timmy, he has declared thread whose first letter is small t which is not Thread you are talking.and run() as you said earlier he has not defined.

Originally posted by Venkat Ramsimha:
public class SwitchTest
public static void main(String []args)
System.out.PrintIn("value =" +switchIt(4));
public static int switchIt(int x)
int j = 1;
case 1: j++;
case 2: j++;
case 3: j++;
case 4: j++;
case 5: j++;
return j + x;

hi all,
can anybody explain y for the above program the output is 8


since x=4 -> execution starts from case 4
j=1 becomes j=2 then
j=2 becomes j=3 then at last in default
j=3 becomes j=4 then
then we have return j+x; which is return 4 + 4; so 8 is output

hmmm gr8...I had the same score in SCJP and I know the feeling...
still time to

let us have a party ...

you will forget all your and :roll: and


Originally posted by Venkat Ramsimha:
public class Fooaw implements Runnable
void run (Thread t)
public static void main (String[] args)
new thread (new Fooaw()).start();
Hi All,
can anybody provide the explanation as why the above program is giving compile time errors


where have you declared thread class ?
and where have u declared run() ?

[ May 12, 2005: Message edited by: Mr Kumar J ]
[ May 12, 2005: Message edited by: Mr Kumar J ]

static void printS2(){
void printS2(){
System.out.println("P. printS2");

Can we have same method names printS2(non-static) and printS2(static) ?

[ May 12, 2005: Message edited by: Mr Kumar J ]
Refer to this...
max(double a, double b)
Returns the greater of two double values.
min(double a, double b)
Returns the smaller of two double values
abs(float a)
Returns the absolute value of a float value.
ceil(double a)
Returns the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer.

floor(double a)
Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer.

round(double a)
Returns the closest long to the argument.

straight from the API.
Now let us take 24.4354321333
what will max(),min(),abs(),ceil(),and floor() of this number?
Can u plz mention the page no. on which this statements are made?
what they meant by "application level" is a bit ambiguous...may be they meant at coding level(that's what I felt) else if what you people are putting then definately we can disable scripting at application level...that is if I use the pattern *.* then I am in fact disabling all the JSP's in question...

:roll: any body from HF plz...