Helen Tal

Greenhorn
+ Follow
since Jun 15, 2002
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 Helen Tal

thanks, all this is exactly what i needed.
21 years ago
is this package in jdk1.4? i have 1.3.1 and i don't find it...
21 years ago
thank you Dirk and Tom.
one more question: verbose - is it java's or dos's? the truth is a want to know dos at least a little. i do know how to navigate from directory to directory, but that's all.
21 years ago
regarding Ben Pike's question: i do my java exersices using Notepad and happy with it. but all the commands i know so far are java and javac. i'd like to know more. does this mean i have to learn dos? where can i find more useful commands?
21 years ago
thank you very much. it's ok now.
21 years ago
hi everybody,
i'm trying to solve the simple problem and i have a problem! how annoying...
it goes like this "Create an abstract class with no methods. Derive a class and add
a method. Create a static method that takes a reference to the base
class, downcasts it to the derived class, and calls the method.
In main( ), demonstrate that it works.
this is my code:


My questions are:
1. Am i doing exactly what i'm asked to?
2. What's wrong?
thnx in advance
21 years ago
thank you, Marilyn and CL, of course, curly braces. sorry, English is not my mother tongue. i didn't know i can do this kind of initializing in a class, so tnx, i've learned something new.
ok, i understand now what he means when he talks about if statement.
CL, this class can't have a constructor, cause it's an anonymous inner class. that's like i understand this.
21 years ago
thank you, Dirk, it looks much better now.
21 years ago
i don't know why the Graemlins took the places of the letters. it was Destination and Parcel, of course.
21 years ago
hi everybody,
i have two questions here:
1. there is some code and quotations from my book:
//: c08: Destination.java
public interface Destination {
String readLabel();
} ///:~
"... what if you need to perform some constructor-like activity? "(for the inner class, they mean).
"With instance initialization, you can, in effect, create a constructor for an anonymous
inner class:

Inside the instance initializer you can see code that couldn’t be executed as part of a field
initializer (that is, the if statement). So in effect, an instance initializer is the
constructor for an anonymous inner class."
a)why i must have this parenthesis before "cost = Math.round(price);" and after "System.out.println("Over budget!");"? why it doesn't work without them?
b)if statement really can't be executed as part of a field initializer?
2.thanks to all who tried to help me with my last question (about gc). now i know that there is the option verbose:gc, but how to use it? "java -verbose Class" (a class name) works, but "java -vebose gc" - doesn't.
Sorry, it was long... And tnx in advance.
Helen
[ edited to preserve formatting using the [code] and [/code] UBB tags and remove smilies -ds ]
[ June 30, 2002: Message edited by: Dirk Schreckmann ]
21 years ago
ok, but what i don't understand is why when i run this program on the first computer the garbage collector always collects all the objects, but if i do it on the second computer, it collects only part of them.
21 years ago
thanks everybody,
i've just forgotten to say that my program (its not mine really,its an example from the book) calls System.gc() explicitly. and that yes, there are different OS's: Win98 and Win2000.
21 years ago
i am trying to run some code sample from my Java book, and the output is not the same as in the book: the programm ends before the gc() does it's job. i have tried both jdk1.2.2 and jdk1.3.1_01, but there is no difference (actually, there is: on jdk1.3.1_01 the programm ended even more quickly). then i've did it on another computer, and it worked just as in the book example. why?
21 years ago

Originally posted by Dirk Schreckmann:
private members of a superclass are only accessible from within that class - the subclass knows nothing of the existence of private members in the superclass.
Making sense yet?


Year, I understand it. It indeed was the matter of wording. Thank you very much. (And it wasn't my last question here, I suspect!)
Btw, I LOVE this site.
21 years ago
Hello everybody,
can anybody help me with this:
there was a question in the Game: "Can a private method of a superclass be declared within a subclass?" and the right answer is "Yes. Private methods can NOT be overriden, but they CAN be re-declared/redefined on the subclass object." Can you give me some code example? What they mean "redeclared/redefined"?

[ June 15, 2002: Message edited by: Helen ]
21 years ago