christie xu

Greenhorn
+ Follow
since Mar 06, 2001
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 christie xu

finished OOP-4, finally graduated!
thank you,
Congratulations!!!
Could it be that you did it in 1 attempt??
[ February 03, 2002: Message edited by: Pauline McNamara ]
20 years ago
could somebody explain what Iterator and ListIterator does? when should we use Iterator and when ListIterator?
" ...ListIterator allows you to iterate backwards over a list as
well as forwards." How is the iterate backwards working? could
someone give me a simple example?
and a question about the example code on page 388( Thinking in Java), after get the iterator and print out, "the order in which the elements are listed is not the order in which they were added."
why is that? the iterator can do the sorting as well?
thanks in advance,
20 years ago
thanks a lot, every one. I know what is going on now.
20 years ago
Could somebody tell me what the hashcode exactly is?
Where to use it?
Is it anything related with the key value?
if I put:
HashMap hm = new HashMap();
hm.put( "one", new Integer( 1 ) );
System.out.println( HM.get( "one" ).hashCode() );
it prints out 1. but if I change Integer object to Float, it prints out 1065353216. what is that?
20 years ago
Thank you, Marilyn.
20 years ago
could somebody explain this to me?
quote: "a super class constructor is always invoked when yu create a subclass object. if you don't explicitly call a
superclass constructor, then the no-arg constructor of the
superclass is called for you. If the superclass doesn't have a
no-arg constructor(..), then you will get a compilation error
along the lines of "no constructor found in superclass." "
From my understanding, Object class is the ultimate superclass
of all classes, so you can always find the no-arg constructor
in the superclass(indirectly), right? then where is this error coming from?
Thanks in advance,
christie
20 years ago
I am having the same problem when I paste the code from textpad
to my hotmail account. How did you set it to fixed width font?
thanks in advance,
21 years ago
hello,
I am at:
assignment Say -4b
attempt 2
21 years ago
According to my teacher, String is like an array, it can not be resized once created. But how come you can modify a String like:
String s = "abc";
s += "-" + "def";
This is confusing me.
21 years ago
I need some help for the Say assigment. I use 2 arrays, one for the numbers less than 20, another for the tens(20, 30..). here is my code:
if number less than 20
print units[]
else if number is tens
print tens[]
else
print tens[] + "-" + unit[]
I was nitpicked for printing tens twice here. but how do I extract the print statement out of the if-else clause?
21 years ago
I don't understand why instructor put
if (arg.length==1)
{
....
}
else
....
what if someone entered more than 1 word? so it is invalid?
21 years ago