Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

chao-long liao

Ranch Hand
+ Follow
since Jul 29, 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 chao-long liao

Which exam can be passed easily,
1.2 or 1.4?
I have failed the 1.2 exam a year before,I am really afraid I will fail again.Please give me some advice about 1.2 and 1.4.
All I know is 1.4 has less scope than 1.2,will 1.4 be more difficult than 1.2?
Thank you so much.
class Violet {
public static void main (String[] s) {
System.out.print(s[1] + s[2] + s[3]);
}
}
Assume the above main method is invoked using the following command line.
java Violet A B C D E F
What is the result of attempting to compile and run the program using the specified command line?
a. Prints: ABC
b. Prints: BCD
c. Prints: CDE
d. Prints: A B C
e. Prints: B C D
1 class Red {
2 public int a;
3 public static int b;
4 public static void main (String[] in) {
5 Red r1 = new Red();
6 Red r2 = new Red();
7 r1.a++;
8 r1.b++;
9 System.out.println
10 (r1.a+", "+r1.a+", "+r2.a+", "+r2.b);
11 }
12 }
Somebody please tell me what's the order of the code.ex: 2->3->4->5->2->3
I am confused.Thanks.
1. class Red {
2. // Comment1
3. // // Comment2
4. /* Comment3 */
5. /* Comment4
6. */
7. /** Comment5 */
8. // /* Comment6 */
9. /* // Comment7 */
10. /* /* Comment8 */
11. /** /* // Comment9 // /* */
12. /* Comment10 */*/
13. /* Comment11 /* Comment12 */ */
14. }
What is the result of attempting to compile the program?
Ans: compile error at line12,13
why??
http://www.danchisholm.net/
The following words have been selected from the set of java keywords, java literals, and words from other programming languages. Which of these words belong to the set of java keywords?
a. next
b. catch
c. function
d. instanceof
e. mod
f. const
g. or
h. goto
i. false
j. transient
k. None of the Above
ans:bdfhj,how about i???false is not a keyword??
An exception can be caught by a catch block with an argument type that is a superclass of the thrown exception??
Ans:True
What's the meaning of the above statement?
I can't get what it says.
In a switch statement, the argument to the case( case(argument) )can be any variable which can fit within an int??
Ans:false, the case argument must be either an int literal, or an int-compatible variable which is a constant.
What's the meaning??I can't understand what it says??
When a new object is created,its constructor will not complete until "all constructors" higher on the inheritance tree have completed
Ans:YES
why??all constructors??how about the following code??
class A{
A(){};
A(int a){};
}
class B extends A{
B(int b){};
}
Marcus mock exam.
Which of the following statements are true about a variable created with the static modifier?
1) Once assigned the value of a static variable may not be altered
2) A static variable created in a method will keep the same value between calls
3) Only one instance of a static variable will exist for any amount of class instances
ANS:3
But why??What's the meaning of the option 3??
I can't get what it says.
Please recommand the best book for scjp exam.
I had RHE book now.
I want to buy a new one.
thanks
Some question of mock exam are tough,for example:
Which of the following are methods of the Collection interface?
1) iterator
2) isEmpty
3) toArray
4) setText
When I wrote code,I never used the interface Collection,so I do not know the answer of this question.Do this kind of questions appear in the exam??

1) 10030
2) 20030
3) 209930
4) 10020
Ans is 4,in my opinion,I think the answer should be 10010,because v = vh, so the
System.out.print( v.i ) should be 10,so what's the problem ?
[ Jess added UBB [code] tags to preserve whitespace -- check 'em out! ]
[ July 13, 2002: Message edited by: Jessica Sant ]
Which of the following statements about threading are true
1) You can only obtain a mutually exclusive lock on methods in a class that extends Thread or implements runnable
2) You can obtain a mutually exclusive lock on any object
3) A thread can obtain a mutually exclusive lock on an object by calling a synchronized method of that object.
Answer are 2 and 3,but why ??
Don't worry about that,guys.
scjp 310-025 java2 version
scjp 310-035 java4 version
In the future,sun will has two exam like that, just like Solaris exam,you can choose the version you want.
The policy will take effect later this summer when Sun releases a new version of its Certified Java Programmer (SCJP) exam. At that time, instead of retiring the older exam as has been done in the past, Sun will split the certification into two tracks:
SCJP for Java 2 Platform, Standard Edition, version 1.4 (new exam)
SCJP for Java 2 Platform, Standard Edition, version 1.2 (old exam)
The statements above mean that there will have 2 exam after August,scjp 1.2 and scjp 1.4,right??