Hung Yee

Greenhorn
+ Follow
since Dec 22, 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 Hung Yee

JavaWorld has an article on this topic that might interest you:
http://www.javaworld.com/javaworld/javaqa/2003-12/02-qa-1226-sizeof.html
16 years ago
Sun has a tech tip article on making 'deep copies' that might interest you:
http://java.sun.com/developer/JDCTechTips/2001/tt0410.html#making
16 years ago
FYI: Sun has a tech tip article on making 'deep copies' of objects that might interest you:
http://java.sun.com/developer/JDCTechTips/2001/tt0410.html#making
16 years ago
How about using the switch statement? It's essentially another way of doing conditional logic.
16 years ago
If it was me, I'd display some friendly message to the user saying what argument(s) was bad and why, then return from the main method.
16 years ago
You can try this trick that I learned:

public class Constants{ public final static String EmpNo= "1111".intern(); }

Calling 'intern()' prevents the compiler from in-lining the value to the calling class while still giving you the advantage of using shared literal string values.
16 years ago
Sun has a link about how to use the javadoc tool:
http://java.sun.com/j2se/javadoc/index.jsp
16 years ago
You need to use the 'equals()' method in the String class to test for string equality. See this tech tip article from Sun for more details about string equality:
http://java.sun.com/developer/JDCTechTips/2004/tt0504.html#2
16 years ago
FYI: Sun has a tutorial that talks about a variable's scope that might interest you:

http://java.sun.com/docs/books/tutorial/java/nutsandbolts/scope.html
16 years ago
You're trying to tell the compiler that "-23.3L" is a Long integer type, but that's impossible because the number -23.3 is definitely not an integer.
16 years ago