Sherman Hung

Greenhorn
+ Follow
since Dec 15, 2001
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 Sherman Hung

I have passed the exam two weeks ago and now start to think about how I can learn more from the practical sides.
I have to say the exam context is about syntax and simple exercises in different sections. I am also a beginner in Java programming, I would like to know how many areas that I can move into the practical world. Which areas are more interesting more others? Where (web pages) I can get the infomation?
Thanks.
21 years ago
Just passed today => 72%. I started this from scratch. I spent about 3 and a half months to prepare. Overall, the Mughal book is the best. However, for a starter, this book is not the first choice. It is too advanced. I suggest start a java dummies or other starter book. Make sure you can write codes that will pass compiler first.
Also the JQPlus is good. You need the hand on practices also. It is very important to understand the way they ask the questions.

21 years ago
class ValHold{
public int i = 10;
}
public class ObParm{
public static void main(String argv[]){
ObParm o = new ObParm();
o.amethod();
}
public void amethod(){
int i = 99;
ValHold v = new ValHold();
v.i=30;
another(v,i);
System.out.print( v.i );
}//End of amethod
public void another(ValHold v, int i){
i=0;
v.i = 20;
ValHold vh = new ValHold();
v = vh;
System.out.print(v.i);
System.out.print(i);
}//End of another
}
1) 10030
2) 20030
3) 209930
4) 10020
What is the correct answer?
I can understand 10 and 0 but 20. Is Java call by reference or call by value? Why it is not 30?
Why the following statements are false?
1. If the reference x and y denote two different objects, then the expression x.equals(y) is false.
2. If the reference x and y denote two different objects, then the expression (x.hashCoce() == y.hashCode()) is false.
I am taking Mughal mock exam. Here is another one that I cannot make it. Why the result is 5 not 12? Why the result of concat isn't " Hello workd"?
public class Q03e4 {
public static void main(String args[]) {
String space = " ";
String composite = space + "hello" + space + space;
composite.concat("world");
String trimmed = composite.trim();
System.out.println(trimmed.length());
}
}
Why the result is 1 0 1? How the values are changed in method g?
public class Qcb90 {
int a;
int b;
public void f() {
a = 0;
b = 0;
int[] c = { 0 };
g(b, c);
System.out.println(a + " " + b + " " + c[0] + " ");
}
public void g(int b, int[] c) {
a = 1;
b = 1;
c[0] = 1;
}
public static void main(String args[]) {
Qcb90 obj = new Qcb90();
obj.f();
}
}
Ran into a program that appears to difficult to dicipher. Help. The result is 22.
class Base {
int i;
Base() {
add(1);
}
void add(int v) {
i += v;
}
void print() {
System.out.println(i);
}
}
class Extension extends Base {
Extension() {
add(2);
}
void add(int v) {
i += v*2;
}
}
public class Qd073 {
public static void main(String args[]) {
bogo(new Extension());
}
static void bogo(Base b) {
b.add(8);
b.print();
}
}
As I mentioned in the early email, I took the exam Friday. I didn't notice too many questions in the following areas:
Painting: Paint(), Repaint(), setting fonts, and drawing.
Layout Manager,
Inner classes, (this was a little bit out of surprise)
Event Handlers
However, the following areas have quite a bit coverage and some of them are tricky:
io,
modifiers,
thread (synchronized),
reserved words (especially static),
excetpion controls.
Do we have a consensus of weighting score for each above area?
Just took the first time exam on Friday and got a score of 55%. I didn't expect so many questions of io. It even asked how to append a stream to an existing file.
I have been using RHE and Mughal but these two books, occuring to me, do not cover the enough deails for the exam. Mughal is hard to digest in terms of reading. RHE is way too easy to be ready for the exam.
I think, for me to try it again, I will spend more time to do more mock exams. just got a copy of JQPlus. Thinking about waiting for two more weeks to take it again.
22 years ago
Would like to know which editor or IDE is the most popular for a starter. I have been using JPADPro but have some problems to run the programs after compilation.
What I am looking for is a simple IDE to compile and RUN the program smoothly and it doesn't have to be sophisticated.
Thanks.
In my reading, there are lots of references to CONSTRUCTOR. What exactly does the word constructor mean? Sometimes, it means a class, a object. . .
I am confused with this() and super(). Can anyone explain these two in a plain text that can help me to move on other subjects. Thanks. :roll:
Please advise which mock tests are the best. I heard about JQ but the link lead me to a portal.
I have been studying the exam using both books. I have read through the Mughal book and have questions in many areas. I then bought the RHE book. This book is just like a breeze. It makes the Java learning much easier.
The question I have is would it be enough just focus on the RHE book? Is the coverage enough to challenge the exam? Thanks.
Where you can get the JQ test? I went to the link and a portal showed up. . .