Blanka Li

Greenhorn
+ Follow
since Feb 18, 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 Blanka Li

w/o
hi, all
what is "w/o"?
thanks!
hi, all of friends,
"a class with a different main signature or w/o main method will compile. but throws a runtime error."
where "w/o" main method is for what?
thanks!
Mock2 Question 22)
What can cause a thread to stop executing?
1) The program exits via a call to System.exit(0);
2) Another thread is given a higher priority
3) A call to the thread's stop method.
4) A call to the halt method of the Thread class?
answer: 1) 2) 3)
whether 2) is right? If in a time-sliced scheduling, it can't the answer, but in a preemptive scheduling, it is the answer. Because here does not point out the scheduling , I think 2) should not be selected. Do you think so?
with many thanks!
I see, thank you all!
what is instance method? Is there any difference between instance method and class method?
thanks!
Pls look this example:
class A
{
}
class B extends A
{
public static void main(String[] args)
{
new B();
}
}
//-----------------------
if run: java B
the initialization steps as follows:
1 members(here none) in class A is initialized and assigned the default value.
2 the constructor of A is called.
// so A is initialized a object.
3 members(here none) in class B is initialized and assigned the default value.
4 the constructor of B is called.
// so B is initialized a object.
if A is an abstract class
the constructor of A is still called. but can't be initialized to be an object, why? I don't know how to make a class into an object. That is the principium to initialize a class to be an object.
who can help me?
with many thanks!
"Every class has constructor". Is the line right?
Does Object class has constructor?
Does abstract class has constructor?
If abstract class has constructor, when its subclass is initialized, is the abstract class' constructor called? We know abstract can't be initialized.
who can tell me?
with many thanks!
what book of yours?
I try it, and it works well.
here is the test code:
package Test;
public class Test
{
public static void main(String[] args)
{
System.out.println("Test OK!");
}
}
on jdk1.4.
Jose Botella, thank you very very much!
"Vector and HashTable are the only classes that are thread-safe".
what is the meaning of "thread-safe" here? And why the two class are thread-safe?
thanks!
wait() and notifyAll() are only used in a code paragraph signed by synchronized,no matter a thread exists or not. So in a thread, if there is no synchronized code, wait() can't be used. So the thread can't be stopped using wait method.
In the SCJP Mock No1 exam, no. 59.
I think a private method can't be inherited by a subclass. So the method, private void amethod(int iBase), in the super class is a different method from the method, public void amethod(int iOver), in the subclass. They should not be treated as overridden in relationship, but as two different methods without same access space.

Do you agree with me?
In jdk1.4 javadoc api, java.io.ObjectOutputStream.writeObject(Object obj). But in the book of Complete Java2 Certification Study Guide, it says "The argument type for the writeObject() method of ObjectOutputStream is not Object but Serializable". Why difference?
thanks
21 years ago