Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!

Ikechukwu Morah

Greenhorn
+ Follow
since Nov 01, 2002
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 Ikechukwu Morah

Please, can anybody help me with some suggestions on how to add audio and video files to an applet.
Thanks in advance.
Ikechukwu Morah
18 years ago

Originally posted by Danny Duong:
Is there any subtle differences between the following two declarations?
int [] x = {1, 2, 3};
int [] x = new int[] {1, 2, 3};


Yes.
The first is implicit initialization of an array.
You use the new int[] to initialize the array object itself. That is, if you want your array to contain 3 elements, you make use of the new operator in this way,
int [] x;
x = new int[3];
Then, you can explicitly initialize each element of the array object, referenced by a primitive variable 'x'.
int [] x = new int[] {1, 2, 3}; // will
// give compile-time error
All the best Danny
Fintan,
Excellent explanation. I benefitted a lot from that.
Thanks.
Ikechukwu Morah
Hello everyone,
This is really an interesting discussion. I took sometime to read through and it enriched my understanding a lot.
Thanks to all.

Morah Ikechukwu
Given:
1.byte [] array1, array2[];
2.byte array3 [][];
3.byte[][] array4;
If each array has been initialized, which statement will cause a compiler error?
A.array2 = array1;
B.array2 = array3;
C.array2 = array4;
D.both A and B
E.both A and C
F.both B and C
My Answer:
F = both B and C will cause compilation error.
Addition:
array3 = array4 will not cause compilation error too.
Does anybody disagree with me on this issue?
Ikechukwu Morah
Hello everyone,
Please, can somebody help me with some quick advice, tips and final revision materials 'cos I want to write my SCJP on 1.2 this Friday.
Thanks for your anticipated kind gesture.
Ikechukwu Morah
Thanks Kathy,
I hope In can have such detail as per what I should know for the exam as regards the following topics:
1. java.io package
2. Threads
Thanks in anticipation.
/**
Hello everybody,
I've been trying to figure out the solution to this problem. Please, someone should help me out.
Thanks in anticipation.
**/
Given:

Which statement at Point X on line 1 allows this code to compile and run?
A.import java.io.PrintWriter;
B.include java.io.PrintWriter;
C.import java.io.OutputStreamWriter;
D.include java.io.OutputStreamWriter;
E.no statement is needed.

[ Jess added UBB [code] tags to preserve whitespace, check 'em out! ]
[ December 10, 2002: Message edited by: Jessica Sant ]
Velatin,
Thanks a lot for your answer.
It's me,
Ikechukwu Morah
Which of the following are true and why?
1. An anonymous inner class may be declared as final.
2. An anonymous inner class can access final variables in any enclosing scope.
3. An anonymous class can be declared as private.
4. An anonymous inner class can implement multiple interfaces.
What type of relationship is represented by the code snippets below:
A. public class Species {}
public class Animal {
private Species species;
}
B. interface Component {}
class Container implements Component {
private Component [] children;
}

Originally posted by Valentin Crettaz:
3 is wrong, String object are immutable, once created, there is no way to change any character of the string. All mutating methods you invoke on a String object will return you a new String object.


If a String object is immutable, then from the question, the option 3 is also correct.
Please,
Can someone help me with how I can get SUN ONE AS 7 configured for my J2EE Applications Development.
I am new to J2EE.
Thanks in advance.
Iyke Morah.
18 years ago
JLS
Jessica Sant
I really benefited from the advice u gave. Thanks a lot.
I am also preparing for my SCJP too.
Ikye Morah.
How do you use the join() method in threads?