Aly Gilani

Greenhorn
+ Follow
since Jul 20, 2004
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 Aly Gilani

Originally posted by kelvin cheung:
i get this message :

'java' is not recognized as an internal or external command,
operable program or batch file.



Hi Kelvin,

I think your PATH variable is not set properly.



make sure you have C:\<JDK>\bin directory in the path.

HTH,

Aly
16 years ago
Thanks for your reply Ernest!
17 years ago
Thanks for your reply Steve.

But isnt it against good coding practices to use return statements in the middle of a method?

And also we would end up with a lot of return statements if we are dealing with multiple params. Any other way to deal with it?

Thanks in advance.

Aly
[ June 27, 2005: Message edited by: Aly Gilani ]
17 years ago
Hello all,

I've heard from many people that we should not throw exceptions explicitly as they are really expensive. So we shouldn't do something like this if we dont want to execute the code after the nullCheck:



The other way we can accompish this is by using statement blocks (which are nasty), something like:



My question is: in such instances when we dont want to execute the remainder of the code in a method, what would be the best way of doing it?

Thanks in advance,

Aly
[ June 27, 2005: Message edited by: Aly Gilani ]
17 years ago
Hi Prerna,

Instead of using substring you can try using:

String [] strArray = line.split(" ");

and then just loop through the values in the row.

Hope that helps,

Aly
17 years ago
Hi William,

It seems that you have a couple of different runtime environments and a SDK. The SDK is 1.4 but the runtime environment is 1.5.

I think you should remove all the current installations of java (SDK and JRE) and download the SDK from java.sun.com (The SDK includes JRE)

Hope that helps.

Aly
17 years ago